Isuru Prabath

Isuru Prabath

Migrate MySQL Database with MyISAM engine to MariaDB

I recently had to migrate some Wordpress MySql databases to MariaDB. MariaDB does not support MyISAM tables and utf8mb4_unicode_520_ci collate. So I had to replace MyISAM with InnoDB and utf8mb4_unicode_520_ci with utf8mb4_unicode_ci.

All of those databases are smaller than 100MB, so here is the simplest method I discovered for migrating a MySql database with MyISAM tables to a MariaDB database.

  1. Created a SQL file from the database dump.
  2. Opened the SQL file in a text editor. In my case, I used notepad++.
  3. Replaced string MyISAM with InnoDB.
  4. Replaced string utf8mb4_unicode_520_ci with utf8mb4_unicode_ci.
  5. Saved the file and imported into the new database server.

The above steps worked for me; however, they may not work in your case; therefore, please conduct additional research.

Crafted with ❤️ in 🇱🇰