Tag Archives: RAM

Replacing MySQL with MariaDB in a CentOS VPS


MariaDB is a database server that offers drop-in replacement functionality for MySQL. MariaDB is built by some of the original authors of MySQL, with assistance from the broader community of Free and open source software developers. In addition to the core functionality of MySQL, MariaDB offers a rich set of feature enhancements including alternate storage engines, server optimizations, and patches.

Before installation you can wget its packages from a mirror:
1. Go to their download page: http://downloads.askmonty.org/mariadb/
2. Select the version you wish to use (personally I like the new 5.3 series given the improvements it has)
3. Select the linux package in the checkbox and it should give you some options
4. In my case, since my CentOS install is i386 I’ve clicked in “CentOS 5 x86 RPMs”
5. Browse the mirror rpms and wget each of them in the server. I recommend creating a new directory for the packages to be downloaded into.

mkdir mariadb
cd mariadb
wget package-url

Now you can follow the instructions here:

Possible issues and fixes:
I had it complaining about missing Perl(DBI) running “yum install perl-DBI” (without quotes) in ssh installs that dependency.
Since you had to remove mysql from your server, you may have also removed php-mysql package. To reinstall it “yum install php-mysql” (without quotes) and then restart apache.

Tuning MariaDB:
Create or edit the my.cnf file at /var/lib/mysql/

Add add this:


Setting default storage engine back to myisam is useful if you, for some reason, want to go back to MySQL.
Disabling innodb would reduce RAM usage if you don’t need it.

Issues with Webmin and how to fix:
MySQL Database Server > Module Config

Command to start MySQL server: /etc/init.d/mysql start
Command to stop MySQL server: /etc/init.d/mysql stop
MySQL configuration file: /var/lib/mysql/my.cnf

Should you require any help, reply to this thread and I (or someone) will help you 

PS: Don’t forget to restart mysql after changing configuration


credit goes to neweracracker