Kavod Company

Free blogware !

debian-sys-maint@localhost connection error on mysql

A very strange error occured during reboot of my server (just after apt-get upgrade):

error: ‘Access denied for user ‘debian-sys-maint’@’localhost’
(using password: YES)’

After some search on the web, I found the solution.

The debian_sys_maint user is the one used by mysql user system under debian sytems. In order to fix this (seeming to be a grant error) do like this:
Save the password of debian_sys_maint user which is localized in /etc/mysql/debian.cnf file (readable only by root):

sudo more /etc/mysql/debian.cnf

The file is in following format:

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = ftL7po8KaZD4Vh0a <= The debian user system password
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
user = debian-sys-maint
password = ftL7po8KaZD4Vh0a
socket = /var/run/mysqld/mysqld.sock
basedir = /usr

Save somewhere this password, then connect on mysql under root:

mysql -u root -p

and execute following command:

mysql > GRANT ALL PRIVILEGES ON *.* TO ‘debian-sys-maint’@'localhost’
IDENTIFIED BY ‘your_password’ WITH GRANT OPTION;

And should be OK now.

Article translated from “Chérie, je l’appelle comment mon blog ? French language website

1 Comment so far

  1. savannah février 16th, 2009 22:08

    thank you for this help.

Leave a reply

*
Pour prouver que vous n'êtes pas un bot, recopiez le code ci-dessous
Anti-Spam Image