How to Fix MySQL Error “Stopping MySQL database server : mysqld failed!” on Debian Squeeze

This problem happens when you modify user table in mysql database. In Debian system, there is a user named debian-sys-maint. We can’t restart mysql daemon if the password is not correct. We have to update the password for that user.

# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld failed!
Starting MySQL database server: mysqld already running.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'    

First, we check the password:

# cat /etc/mysql/debian.cnf  | grep password

password = oY7nuYwX9jUsDuN

Login to mysql shell as root

# mysql -u root -pyour_root_password

Now use the following command to update the debian-sys-maint user password:

GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'the_password' WITH GRANT OPTION;  

Replace <password> with oY7nuYwX9jUsDuN.

It’s done.

Now test by restart mysql daemon.

# /etc/init.d/mysql restart

2 thoughts on “How to Fix MySQL Error “Stopping MySQL database server : mysqld failed!” on Debian Squeeze

  1. -bash: lt: command not found

    is what i get returned to me. i have had this problem for months and has has no affect.. but now an upgrade has started causing all kinds of wacky fun things. any suggestions?

    Thank You

  2. Does absolutely nothing. I am thinking this issue is non fixable. I have been at this for two days now and see lots of people with the same issue and lots of fixes – however – none work.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.