Upgrading to MariaDB 10 from MySQL 5.6 with DirectAdmin

MariaDB 10 is the next generation of MySQL and improves on both speed and performance over MySQL 5.6 and earlier versions. In our in house tests, Mean Servers was able to decrease server load by 75% on database intense applications by upgrading to MariaDB 10 from MySQL 5.6. If you need a high performing database engine, MariaDB is the way to go. It is important to note that when upgrading from MySQL 5.6, there are no compatibility issues assuming your database's meet the requirements of MySQL 5.6. It is extremely easy to upgrade to MariaDB 10 from MySQL and in most cases, it is just a drop in replacement, no need to modify your tables or anything like that.

This guide was written especially for upgrading to MariaDB 10 from MySQL 5.6 on a CentOS 6.x 64-bit system. This method has been untested on other operating systems running a control panel other than DirectAdmin. Please proceed with caution and as always, read the directions in full before beginning the upgrade to ensure you have the capabilities, knowledge, and skills to ensure a proper upgrade. Mean Servers can assist in upgrading your system to MariaDB 10 for a one time fee of $20. Just contact our sales department if you would rather us do it for you.

Prerequisites:

-CentOS 6.x (64-bit)
-DirectAdmin
-MySQL 5.6 currently installed

Step 1:

Ensure your system is completely up-to-date by running yum -y update as root

Step 2:

Edit /usr/local/directadmin/custombuild/options.php and locate the mysql_inst value. Change the value from yes to no, the line should now read mysql_inst=no. This will prevent DirectAdmin from updating MariaDB and installing an older version of MySQL. DirectAdmin does not yet support MariaDB out of the box so we will use yum to keep things updated instead.

Step 3:

Edit /etc/yum.conf and remove mysql* MySQL* MariaDB* from the exclude line. This will allow yum to manage the MariaDB installation instead of DirectAdmin.

Step 4:

Create a new repo file as follows: /etc/yum.repos.d/MariaDB.repo

Step 5:

Insert the following into the newly created repo file then save and exit:

# MariaDB 10.0 CentOS repository list - created 2015-05-13 19:05 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Step 6:

Clear the yum cache by running: yum clean all

Step 7:

Install MariaDB 10 by running: yum install MariaDB-server MariaDB-client . This will replace your old MySQL installation with the new MariaDB 10 installation.

Step 8:

Start MariaDB 10 by running: /etc/init.d/mysql start

MariaDB 10 has now been installed and is running. You should notice a speed and performance improvement immediately. Mean Servers again is more than happy to upgrade your MySQL installation to MariaDB from any version for just $20. As with anytime you access your machine via root, please use extreme caution. If you are unsure about something, contact an experienced system administrator. Mean Servers takes no responsibility for self installed upgrades and this guide has been written for educational purposes only without warranty. We appreciate your feedback, if you have anything to add, feel free to contact us.

  • 143 Users Found This Useful
這篇文章有幫助嗎?

相關文章

Adding IPv6 Functionality

DirectAdmin is a fantastic control panel and obviously, the one we recommend to all of our...

Protect DirectAdmin from Brute Force Attacks

A common method of gaining access over a server is to use a technique called a brute force...

Change Domain in DirectAdmin

This tutorial was written for those wishing to change their domain when using DirectAdmin as...