I have an Ubuntu server 18.04 LTS with MySQLl 5.7
I have new Ubuntu backup server 20.04 LTS with MySQL 8.0
MySQL 5.7 backup created:
mysqldump --all-databases > "filename" -u root -p
Restore to 8.0 fails on MySQL database due to ISAM tables.
Restoring individual databases, except MySQL, works as expected.
Once I have an 8.0 backup I'll upgrade the 18.04 server to 20.04 with MySQL 8.0
Is it possible to modify the MySQL 5.7 dump to load on 8.0?
Best Answer
Recreate the dump from MySQL 5.7
Personally, I would recreate the dump without
mysql
schema.Then, you can load
mydbs.sql
in the MySQL 8.0 instance.What about the dump you already have ?
First, find out the lines in the dump where each database starts and the number of line in the dump
As an example, I created a dump from a MySQL 5.7 vagrant instance.
Next, create a new dump. Copy everything above and below the
mysql
schemaIn this case, everything before line 300
Then, copy everything from the first DB after
mysql
schemaIn this case, subtract 1212 (first line of the next DB after the
mysql
schema) from 1341 (the number of lines in the original dump you made) and add 1. Then copy that number of lines from the bottom of the original dump into the new dump:As a demonstration, note how the new dump will not have the
mysql
schemaNow, just load newdump.sql into MySQL 8.0