Our colleagues over at maxcluster told us a while ago, that the best way to migrate a (My)SQL or database or MaraDB ist to use the mysqldump tool which comes with the server we want to import into. They are normally most compatible to each other and can read most of the other databases.
Today my colleague Carl and me wanted to migrate a MariaDB 10.5.23 into a MySQL 8 ddev container. It took nearly half a day and we learned a ton.
Thankfully we already learned last time to properly setup an SSH tunnel for the dump, you can find the other mysql dump posts above in the list.
Make sure your SQL dump does what you expect
Don’t add stupid parameters to mysqldump or miss important
Don’t use --compact or -c because it strips all comments, especially the DISABLE KEYS comments
Because we wanted to change a column from longtext to json, we spotted a problem with our GDPR mysqldump – a missing --no-create-info created a second CREATE TABLE in our script – whoops.
So we learned, that due to the ddev version we used, it contained not only an old version, but not even MySQL (we don’t blame ddev here at all! Know the tools you use ?)
And as expected using the right version and the right parameter just worked out <3