Originally Posted by ldp
I found out how to get it working again.
It seems that the password in the /etc/mysql/debian.cnf file is just a plaintext password altough it looks like an encrypted one. (it has the same amount of random characters like all other encrypted passwords in the mysql.user table)
So instead of putting the pwd directly in the table, I used the password() function to encrypt it and now it works fine again.
Because I have the same problem with mysql and I can restart it.
Can you please provide the exact command you typed.
What I did is to copy password from /etc/mysql/debian.cnf and had it copied inside the following command
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password from debian.cnf' WITH GRANT OPTION;
but i think it didn't work because when I run
mysql -u root -p'password from debian.cnf'
I get the following
Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
I can just restart it to try it because it's a production machine and can't go offline.
Last time I try it, it wouldn't start back-up and I had to remove /etc/mysql/my.cnf in order to start it.