MySQL 5.5 to 5.7, how to handle backups

LawsHosting

Verified User
Joined
Sep 13, 2008
Messages
2,418
Location
London UK
Ok, so, I need to move servers.... Old server MySQL 5.5, new has 5.7, when I restore backups, I get:
Unable to add user <user>. Column count of mysql.user is wrong. Expected 45, found 42. Created with MySQL 50546, now running 50720. Please use mysql_upgrade to fix this error.Can't add user <user> to <dbname>: Unable to add user <user>. Column count of mysql.user is wrong. Expected 45, found 42. Created with MySQL 50546, now running 50720. Please use mysql_upgrade to fix this error.

Error Adding Main Username to database: Column count of mysql.user is wrong. Expected 45, found 42. Created with MySQL 50546, now running 50720. Please use mysql_upgrade to fix this error.
Error with query "CREATE USER '<user>'@localhost" : Column count of mysql.user is wrong. Expected 45, found 42. Created with MySQL 50546, now running 50720. Please use mysql_upgrade to fix this error.
Is there anything I can do, other than installing MySQL 5.5?

There's no mysql_upgrade, even if it did, what use would it be? The data isn't importing.
 
I would upgrade MySQL on the old server, first to 5.6 and then to 5.7, and then create new backups and restore them on the new server. (However, I would recommend MariaDB, and not MySQL.)
 
It appears a
/usr/local/mysql/bin/mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf
was sufficient..... I thought mysql_upgrade would be in the PATH.....
 
Back
Top