Nayara
By:
Nayara

mysqld_safe Can't log to error log and syslog at the same time

September 24, 2015 10.5k views
DigitalOcean MySQL Ubuntu

Hello, I forgot my MySQL password, and following these steps to reset it...
How To Import and Export Databases and Reset a Root Password in MySQL

When I type that command....

# mysqld_safe --skip-grant-tables

I get that message... How I fix it?

150924 14:01:12 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
150924 14:01:12 mysqld_safe Logging to '/var/log/mysql/error.log'.
150924 14:01:12 mysqld_safe A mysqld process already exists
4 comments
  • 150924 14:01:12 mysqld_safe A mysqld process already exists
    

    It means, that MySQL daemon is still online. Use /etc/init.d/mysqld stop in order to stop the MySQL daemon, then try again to use mysqld_safe --skip-grant-tables.

    Also, mind you pasting logs here from /var/log/mysql/error.log ?

  • Hi!

    But the firts command I type is:

    /etc/init.d/mysqld stop
    

    And show me the OK message saying stopped...
    Afterward I type:

    mysqld_safe --skip-grant-tables
    

    And get that error message...

  • I had this problem in ubuntu installation with nginx, mysql and php, did not know what the password, and managed to solve reconfiguring.

    sudo dpkg-reconfigure mysql-server-5.5
    

    source: http://ubuntuforums.org/showthread.php?t=2296259

  • Thanks a million, did not believe how easy this was.

1 Answer

Thanks for the solution..wasted a few hours on this today! grrr

Have another answer? Share your knowledge.