How do I Convert A Single Database From MySQL DB to MariaDB?



  • The web host that I use provides free database via MySQL v5.6.38. Recently, they switched to MariaDB v10.3.31

    They converted all my databases and all my apps still work as expected. The problem is I've put in considerable effort into learning MySQL over two years and so I don't want to abandon it. I know MariaDB is based on MySQL and so there's some good compatibility until MySQL 8. I want to keep developing on MySQL and then just convert/port that particular database to MariaDB. Is there a way to do this?

    Most articles talk about converting/upgrading the whole MySQL instance and its databases to MariaDB. How do I convert just a single database from MySQL format to MariaDB format?

    Thanks.

    UPDATE: While MariaDB is seemingly better than MySQL, MySQL is more popular & more common. For this reason, my plan is to use only features & functions that are common between both of them. - If I happen to change web hosts in the future and the new webhost doesn't offer MariaDB, then I'll have a lot of work to do if I have used features specific to MariaDB.



  • If you develop on a MySQL-5.7 or earlier, most features there are MariaDB compatible ( https://mariadb.com/kb/en/incompatibilities-and-feature-differences-between-mariadb-103-and-mysql-57/ ).

    There's no real convert to MariaDB format in a MySQL server.

    Your learning isn't wasted. There is significant similarity with MariaDB, especially with such an old version of MySQL that you where developing for.

    If MariaDB-10.3 is your hosted application, its prudent to use the same in your development version that way the small number of differences will show up in your development rather than a last pre-deployment step. This will also give you the opportunity to use new database features that are available on your host, like https://mariadb.com/kb/en/common-table-expressions/ , https://mariadb.com/kb/en/window-functions/ , https://mariadb.com/kb/en/sequences/ , and https://mariadb.com/kb/en/function-differences-between-mariadb-103-and-mysql-57/ .




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2