I’m having so many issues with MySQL 8 on a WordPress site that I’m starting to think on using a different platform.
I’m not a super tech savvy user on database, but I read that MariaDB offers better performance out of the box, so the question is:
Thanks,
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, @mhweb
Yes you can spin up a new droplet with MariaDB and then just export your database and import it on the new MariaDB droplet. The process is really simple.
You can always upgrade from MySQL to MariaDB. We have a little article on what the process involves:
https://www.digitalocean.com/community/tutorials/switching-to-mariadb-from-mysql
What you need is to backup all of your databases which you can do with a mysqldump command:
mysqldump --all-databases --user=root --password --master-data > backupdb.sql
You can also backup your /etc/my.cnf file
sudo cp /etc/mysql/my.cnf /opt/my.cnf.bak
Stop the MySQL service:
service mysql stop
Uninstall the MySql server, associated utilities amd MySql user.
sudo apt-get remove mysql-server mysql-client mysql-common
sudo deluser mysql
sudo rm -rf /var/lib/mysql
You need to add MariaDB repository on your system in order to Install MariaDB.
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64] http://mirror.zol.co.zw/mariadb/repo/10.3/ubuntu bionic main'
sudo apt update
sudo apt -y install mariadb-server mariadb-client
sudo /etc/init.d/mariadb start
Finally you want to import the previously exported databases back to MariaDB server as follow
mysql -u root -p < backupdb.sql
Note: It’s important to backup your databases and the /etc/my.cnf file in case something goes wrong with the process, but I will also recommend you to take a snapshot of your droplet before starting the process as in this way you will have an a working copy of your droplet and you can always restore your droplet in case this is needed.
The commands for MySQL and MariaDB are the same, there are some small changes but generally you will feel comfortable with the new version.
Both MariaDB and MySQL require knowledge in order to use them, but I can say that MariaDB is not more complicated than MySQL and that both are easy user friendly, but users often stick with MariaDB because it will almost definitely remain open source.
MariaDB stands tall as a more powerful database as compared to MySQL. Because it provides several advanced features which are till now not introduced by MySQL, and are neither supported in its compatible apps. Many users choose MariaDB over MySQL due to MariaDB’s frequent security releases. While this does not necessarily mean MariaDB is more secure, it does indicate the development community takes security seriously.
Hope this helps!
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.