I completely uphold your decision! I have switched my servers over to MariaDB from MySQL 3 years ago and this was a coerced choice. After being bought by Oracle, MySQL versions were getting worse and worse. Ongoing fails and chart errors produced a negative influence on sites availability, and that was the time, when the decision to switch over to MariaDB was taken.
The result has met our expectations completely, MariaDB is highly stable and well optimized. A three-year long uptime without fails on several servers – is a sufficient proof.
Choosing MariaDB version
There are 2 series of MariaDB - 5.x and 10.x.
5.x – the versions that are maximum close to MySQL of the latest versions, they are fully compatible with MySQL. If you are just switching to MariaDB from MySQL – this version line is for you.
10.x – is a new version line, which was started after 5.5 version. These versions don’t duplicate all the new functions of the latest MySQL versions, but contain their own useful functions. They are still compatible with MySQL, but if you are just starting using MariaDB – it’s better to use 5.5 first.
Installing MariaDB on Linux server
MariaDB distros are not usually included into repositories of the basic Linux distros (for example, in CentOS 6 and CentOS 7). However, even if they were there, it’s advisable to install the native-mode repository MariaDB into the system, in order to have up-to-date versions available all the time. To install yum repository, follow the instruction:
1. Create a new repository file, using the command:
Press i button to switch to the edit mode of vi editing program.
2. Get a file text for your version of Linux distro via this link. You will need to choose the distro name, its version and release:
Copy the text for the repository file, insert it into your file and press ":wq" to save and exit vi editing program.
Now, you can install MariaDB Server and client programs, using yum:
yum install MariaDB-server MariaDB-client
You can install various programming languages libraries for MySQL, they are completely compatible. For example, for PHP:
yum install php-mysql
Now, you need to start the installed MariaDB server and proceed to its settings:
service mysql start
If you’ve done everything correct, you’ll see the following message:
Setting up MariaDB
To start working with MariaDB normally, you will need to set up the root password. I will provide details regarding tuning and optimization in a separate article, these are not the top-priority matters.
Initial setting of the root password for MySQL:
The easiest way to set up the root password is to use a special script, which is included into MariaDB distro:
Follow the instructions and set up the root password.
If you have any questions left or need details – please, ask a question or leave a comment.
I’m always glad to help you!