Migrating from MariaDB to MySQL

A common way to affect such a migration is to use mysqldump to extract the data from MariaDB and then to insert it into MySQL.

Assuming a reasonably simply situation, there will be some incompatibilities in the dump that are easily sorted:

sed -i 's/ENGINE=Aria/Engine=InnoDB/g' dump.sql
sed -i 's/PAGE_CHECKSUM=1//g' dump.sql
sed -i 's/TRANSACTIONAL=1//g' dump.sql
sed -i 's/PAGE_CHECKSUM=0//g' dump.sql
sed -i 's/TRANSACTIONAL=0//g' dump.sql
sed -i 's/ROW_FORMAT=PAGE//g' dump.sql
sed -i 's/ROW_FORMAT=FIXED//g' dump.sql

In this case it was MariaDB 10.3 to MySQL 8.0.36.

Leave a Reply

Your email address will not be published. Required fields are marked *