evil.cz
Linux do každé rodiny, linux do každé kanceláře!

Access denied for user 'root'@'' (using password: YES) after power failure

After power failure mysql refuses root login: Access denied for user 'root'@'' (using password: YES)

Try to log in WITHOUT a password: mysql -u root

If successfull, check users table content:
> use mysql;
> select * from user;
All passwords are probably empty - means login without password is poossible now ;-(

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'new_password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'machine_name' IDENTIFIED BY 'new_password' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Change machine_name and new_password to suit your needs.

Check password for 'debian-sys-maint'@'localhost' !!! This row is probably corrupted too - see /var/log/syslog for message Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) after boot. More information here.

Ještě nehodnoceno. Buďte první :-)