mysqlcheck: Got error: 1045: Access denied for user ‘root’@’localhost’ (using password: YES) when trying to connect

This error occurs when I run the following command:

Note that the command prompts for a password, and I input the correct password for the user root. Why does it still deny the access for root? If you ran the following  command:

There would not be a problem at all. In fact, you should run the following command to check/repair a database/table:

 

Posted in tips of hosting