How can I upgrade from MySQL to MariaDB?

You are viewing an old version of this article. View the current version here.

For all practical purposes, you can view MariaDB as an upgrade of MySQL:

  • If you are using Windows, see also Upgrading MariaDB on Windows.
  • For upgrading from very old MySQL versions, see Upgrading to MariaDB from MySQL 5.0 (or older version).
  • Within the same base version (for example 5.1) you can just uninstall MySQL and install MariaDB and you are good to go. There is no need to dump and restore databases. As with any upgrade, we recommend making a backup of your data beforehand.
  • If MariaDB has a higher main version number, you should run mysql_upgrade (just as you would with MySQL) to finish the upgrade.
  • All your old clients and connectors (PHP, Perl, Python, Java, etc.) will work unchanged (no need to recompile). This works because MariaDB and MySQL use the same client protocol and the client libraries are binary compatible. You can also use your old MySQL connector packages with MariaDB if you want.

Upgrading my.cnf

All the options in your original MySQL my.cnf file should work fine for MariaDB.

However as MariaDB has more features than MySQL, there is a few things that you should consider changing in your my.cnf file.

  • MariaDB uses by default the Aria storage engine for internal temporary files, instead of MyISAM. If you have a lot of temporary files, you should add and set aria-pagecache-buffer-size to the same value as you have for key-buffer-size.
  • If you don't use MyISAM tables, you can set key-buffer-size to a very low value, like 64K.

Other things to think about.

  • MariaDB has LGPL versions of the C connector and Java. If you are shipping an application that supports MariaDB or MySQL you should consider using these!
  • You should consider trying out the TokuDB storage engine or some of the other new storage engines that MariaDB provides.

See Also

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.