Mariadb to Mysql migration

Hi There,
can anyone help, is it possible to migrate mariadb server to mysql.
I am using Mariadb version 10.3.16 and my requirement is migrate this into mysql .

It's been a while, but AFAIK mysql dump should enable you to export your data from mariadb and the generated file should work in mysql.

Thanks Skrynesaver

Do you have the steps to do this migration.
While googling I found the below page to do this migration activity-

https://www.looklinux.com/how-to-upgrade-mariadb-to-mysql/

That's not a bad guide, however if you're not migrating within the same host, I'd import and test on the new host before dropping data :wink:

Hey.

These migrations are not always straight forward because when you create a DB in MySQL and MariaDB, the collation and charsets of the DBs can be different depending on how everything was installed and how the DEFAULT was set up.

So, before you migrate you need to check how the DBs were created. Here is some help:

https://dev.mysql.com/doc/refman/8.0/en/charset-database.html

CREATE DATABASE db_name
    [[DEFAULT] CHARACTER SET charset_name]
    [[DEFAULT] COLLATE collation_name]

ALTER DATABASE db_name
    [[DEFAULT] CHARACTER SET charset_name]
    [[DEFAULT] COLLATE collation_name]

You should know what is the CHAR SET and COLLATE (collation name) for the original DB and insure you are using the same on the new DB.

After you have that set up properly, then it is simply a matter of dumping the original DB and restoring it between the two.

Of course, you should never destroy the original until you have fully tested the new DB in parallel.

Then, when you are sure it is all working; you can of course pick some off time to dump and restore again.

So, the 64K question is:

  1. What is the collation set in your original DB?
  2. What is the char set in your original DB?

You need to understand that first before proceeding.

For example:

SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME
FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'db_name';

For a more comprehensive review, please refer to this section:

https://dev.mysql.com/doc/refman/8.0/en/charset.html

HTH