I recently had my MySQL server upgraded from 5.1 to 5.5 and I'm trying to upgrade my databases using mysql_upgrade but I keep getting this error:
[root@ip-??-???-???-??? ~]# mysql_upgrade -uadmin -p
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed
I can't figure why this won't run. MySQL Server is running.
解决方案
I had the same issue going from MySQL 5.5 to 5.6 on OS X (installed via MacPorts).
Seems that mysql_upgrade needs to be run as user root and only root and a password needs to be set up for the user. Any other user with administrative privileges does not seem work.
So the only valid command seems to be: mysql_upgrade -u root -p