After updating mysql with yum to 5.6 I am getting such an error message when trying to run mysql

[root@host rpm]# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed

I also tried

mysql_upgrade -u root -p

and the result is the same.

  • How did you installed new and old MySQL (by using (yum or apt-get) or compressed file.)? – Ahmad Abuhasna Dec 16 '15 at 10:01
  • With yum. I suspect the update went wrong somewhere... I scrapped the entire virtual server, and rebuilt from scratch with the latest mysql, so the issue is gone. – giorgio79 Dec 16 '15 at 11:22

Please check if you are using correct root password. You can also use another login which has all privileges. Check it by logging to mysql:

enter image description here

Successful login example:

enter image description here

After checking return to server try again mysql_upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.