Recommended
_________________________
You’ve decided to move from MySQL to MariaDB, but you’re a little nervous. The last thing you want is to become mired in a slough of brokenness. Don’t worry, because MariaDB is designed to be a drop-in replacement for MySQL. You should be able to install MariaDB over your MySQL server, and then go about your business without drama. The simplest method follows these steps:- Update your software repositories list with the MariaDB repos
- Update your Linux package manager with the new repos
- Stop MySQL
- Install MariaDB with your package manager
- Go back to work because you’re done
mysql_upgrade, which is a necessary step to check all of your tables for compatibility with the current version of MariaDB, and fix anything that isn’t right. If it doesn’t, run mysql_upgrade manually. Then restart MariaDB, check your logfiles, and if no errors appear, you’re done.
Another, and more labor-intensive, option is to install the new MariaDB server alongside your existing MySQL installation, then migrate databases and applications one at a time. To do this, download the MariaDB source tarball; compile and install the binary; create users, directories, and the init file; set permissions; start MariaDB; check that both MySQL and MariaDB are running; and then start moving stuff. This is also a good exercise for a refresher in the nuts and bolts of installation and configuration, which is always good to know and could save the day when something doesn’t work right.
If you’re running a more complex setup with tons of tables and databases and clustering and masters and slaves, take a look at this detailed guide by Sheeri K. Cabral of the Mozilla IT and Operations team. These people are so proficient with MySQL and MariaDB that they switch between them to take advantage of specific features in new releases. They start by making a logical backup of the database on a slave server, then import this backup into a new empty server installation. Before starting the export/import they use checksums to verify that the data are consistent between master and slave, issue maintenance notices, prevent anyone but root from logging in, take the server out of the load balancer, make sure the slave does not get overwritten by the master during the export, and perform a number of other checks and tests. It’s a lot of steps, but it’s a good safe method that allows you to take your time without taking everything offline.
MariaDB Server is available on leading cloud providers worldwide, and for the best of the best you can find MariaDB Platform including MariaDB Enterprise Server on MariaDB SkySQL.
Resources
- Moving from MySQL
- Enterprise Open Source database comparison: MariaDB vs. Oracle MySQL vs. EnterpriseDB
- Installing MariaDB alongside MySQL
- Replication
- MySQL to MariaDB migration: Handling privilege table differences when using mysqldump
_________________________
Download the latest MariaDB products today