Compile and install MariaDB.
What is MariaDB?
MariaDB is a branch of MySQL. Since Oracle may close the source of MySQL, it is separated (MySQL has been acquired by Sun and Oracle ).
However, apart from being a "downward alternative" to Mysql, some new features included in MariaDB make it better than MySQL.
Official Website description
The instructions on this page will help you compile MariaDB from source. Links to more complete instructions for specific platforms can be found on the source page.
First, get a copy of the MariaDB source.
Next, prepare your system to be able to compile the source.
If you don't want to run MariaDB as yourself, then you shoshould createmysql
User. The example below uses this user.
Using cmake (MariaDB starting with 5.5)
MariaDB 5.5 and above is compiled usingCmake. You can configure your build simply by runningCmakeWithout any special options, like
cmake .
But if you want it to be configured exactly as we do for our releases, use
cmake . -DBUILD_CONFIG=mysql_release
AllCmakeConfiguration options for MariaDB can be displayed:
cmake . -LH
To build and install MariaDB after runningCmakeUse
makesudo make install
If the commands above fail, you can enable more compilation information by doing:
make VERBOSE=1
From: https://mariadb.com/kb/en/mariadb/generic-build-instructions/
The cmake option is similar to the mysql cmake option for reference (Chinese document): http://www.blogjava.net/kelly859/archive/2012/09/04/387005.html
Test practice
# Decompress
tar xfz mariadb-10.0.16. tar .gz |
# Enter the installation directory
# Configuration
cmake . -DCMAKE_INSTALL_PREFIX= /opt/waTeam/mariadb -DMYSQL_DATADIR= /home/datas/mariadb/data/ -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci |
# Compilation takes about half an hour
# Installation
So far, MariaDB compilation and installation are complete.