MySQL upgrade via thesqldump

MySQLmysqldumpupgrade

We want to upgrade to MySQL 8.0 from MySQL 5.6 but upgrade manual seems to cumbersome and risky to follow doing an in-place upgrade so we have decided to do it via MySQL Workbench export (mysqldump) and import our exported database tables into a fresh new MySQL 8.0 installation

Should it be successful or should we do something else in the middle for it to work?

Best Answer

Step 1 :

It's a best practise that first to upgrade MySQL 5.6 to MySQL 5.7, then from MySQL 5.7 to MySQL 8.0.

Step 2 :

Please go through MySQL 8.0 changelog to take changes in your database for deprecated & removed features otherwise upgrade end up in so many errors

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/

Step 3 :

Before, upgrading to MySQL 8.0, run upgrade checker trail using mysqlshell.

mysqlsh mysql_user@192.168.X.X:3306 -e "util.checkForServerUpgrade();" > upgrade_alert.txt

Step 4 :

Final step for upgrade should be done logical only to avoid errors in inplace upgrade.