Restoring 5.7.31 to 8.0.x MySQL Database using Xtrabackup

I have a 3 server replication of 1 source and 2 read-only replicas running on 5.7.31-log Community. I want to add a new, 3rd read-only replica on mysql v8.0.27 (all ubuntu). I was following a guide using mysqldump and run into an issue. Someone suggested Xtrabackup. Procedure looks straight FWD following this guide:

using mysqldump - MySQL Replication Setup without Downtime | Linux Scripts Hub
xtrabackup - How to set up a replica for replication in 6 simple steps with Percona XtraBackup - Percona XtraBackup

I guess my first question is the most basic, is a mysqldump backup of v5.7 compatible with v8? Doing a full I do not know. I have done v5.7 backups of selecting out multiple databases and importing them into v8 with success.

Second, can I use a xtrabackup from v5.7 and import it into a v8 mysql, following the procedure above?

Thanks!
DD

Here’s my original Reddit; www.reddit.com/r/mysql/comments/sdchf9/mysql_import_access_to_system_table_mysqlinnodb

1 Like

Did you ever get an answer to this question? I’d like to know myself. Thanks.

1 Like

The link you have for setting up replication in 6 steps or using mysqldump is for a replication setup.
Off course you can use mysqldump to import the database into mysql 8.0 but the proper procedure for version upgrade should be like mentioned in the below document,

  1. You need to check if your 5.7 database is compatible for upgrade. There are many major changes in mysql 8.0 and you need to use upgrade checker utility. This will check if your database needs any changes before moving to 8.0. If any then you might need to fix it as per the report.
  2. You can restore xtrabackup with same version 5.7 and then run an in place upgrade to 8.0
  3. Since you are upgrading your replica server now, it would be good test to see if your app is compatible with new version and later once confirmed you can plan on master.
1 Like