Thesqld upgrade 5.5 -> 5.6 thesql Error: Failed while fetching Server version! Could be due to unauthorized access

MySQLmysql-5.5mysql-5.6

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.

Best Answer

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