How do I restore a mysql 5.6 source backup on a server with mysql community server 8?

Backup on a server with Slackware 14.2, mariadb 10 (we can say mysql 5.6) and Percona Xtrabackup 2.3; and it must be restored on an Ubuntu Server 20.04 LTS, which has MySQL Server Community 8. I tried, at first, with Xtrabackup 8, which doesn’t have the innobackupex tool, so I had to go back, on this server, to Xtrabackup 2.4. Only after I restored it, mysql does not start, saying that the data dictionary is being updated, but remains in this error.

You must ‘upgrade’ through every major version, please see https://forums.percona.com/discussion/56517/restore-on-different-version#latest

George O. Lorch III

Director of Server Engineering, Percona Server for MySQL, Percona XtraDB Cluster, and Percona XtraBackup

I don’t know what to do, it seems that there is no easy solution. Or I upgrade Slackware to the Current version, and it will have to be offline (this complicates). Or I install mysql 5.6 (via debian packages) on Ubuntu Server to later upgrade, but I would need percona xtrabackup 2.3.9 (to restore and then upgrade mysql), and I can’t find it for download anymore, just 2.4 or 8.

PXB 2.4 can backup and prepare both 5.6 and 5.7. Regardless though, you still must restore your 5.6 backup to a 5.6 server instance, then upgrade that instance to 5.7, and then to 8.0. The only other option is to perform a logical dump via mysqldump and load directly into a fresh 8.0 instance.

George O. Lorch III

Director of Server Engineering, Percona Server for MySQL, Percona XtraDB Cluster, and Percona XtraBackup

I’ll do a test. I will install MySQL 5.6 on Ubuntu Server 20.04, do the restoration, and then do the upgrade gradually. I’ll be back later with the test results.

By the recovery method of Percona Xtrabackup I was not able to, I only managed to do the mysqldump of the Zabbix database that I wanted and recover it directly in MySQL Community Server 8.

Percona Xtrabackup: I test recovering the bank with xtrabackup 2.4 in MySQL 5.6, then I upgraded to MySQL 5.7, but then mysql_upgrade could not be executed because it said that the password had expired, and I was unable to change it. it because it said that the MySQL user table had 45 columns and the experience was that it had 44. That is, there were a series of problems.