PDA

View Full Version : mysql died after host restarted


intr0
05-14-2005, 01:18 AM
hmm, so ive been trying to figure this one out myself without lodging a support ticket, I dont run anything hugely important on mysql, and maybe someone else here has been through the same drama.

basically my host server restarted, when i checked my emails to day I had one from root...


/usr/bin/mysqlcheck: Got error: 1045: Access denied for user: 'debian-sys-maint@localhost' (Using password: YES) when trying to connect

Improperly closed tables are also reported if clients are accessing
the tables *now*. A list of current connections is below.


so it turns out that debian-sys-maint, and root, cannot login to mysql.

so, i figure, okay, ill first stop mysql, then load mysql without any security with:


/usr/bin/mysqld_safe --skip-grant-tables&


then reset my passwords


use mysql;

update user set password = password('whatever') where user = 'root' and host='localhost';

update user set password = password('whatever') where user = 'debian-sys-maint' and host='localhost';

flush privileges;


then I edited the /etc/mysql/debian.cnf to have the same password as I set for debian-sys-maint and restarted sql:


/etc/init.d/mysql stop
/etc/init.d/mysql start


but it still wont start, as though the changes I made haven't applied, debian-sys-maint and root still dont have permission...

Can anyone see where have I gone wrong here?


edit.. i think perhaps those users have been deleted.. so it may be a case of recreating them with the correct permissions... if possible.

bah, lodged a support ticket anyway :)

intr0
05-14-2005, 04:12 AM
for anyone who wants to know, rimus excellent support helped with this rather quickly =D

turns out my root mysql account had been deleted somehow and needed to be added back in with

use mysql;
INSERT INTO `user` VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y' ,'Y','Y','Y','Y','Y','Y','Y');
flush privileges;

cheers to the rimu guys =D