Who logged on to mysql without a password?
A mysql database server has been running normally for a long time. Because the hardware on the slave database server is damaged, you need to re-import the database for synchronization. When you perform the operation again, you forget to enter the option-p (mysql-u root) and go in directly. Scared.
Log on to the system and check whether there is an account with a blank password. Why not check it? Force change the root password and then flush privilges. Try again, or you can log on without a password.
Check the option file/etc/my. cnf to see if a password has been directly written to the file. Search for the file "my. cnf" in the/root directory and check whether the file "my. cnf" is displayed:
[Client] User = root Password = I % ^ KgG76 |
Delete this file and run mysql again!
This may be because someone hides a file here to facilitate database debugging.