Manual:Installation

From Askmonty.org

TOC MariaDB 5.1 Reference Manual: Installation Index

This page contains installation instructions for MariaDB.

Binaries

To install the binaries (downloadable here), unpack the files below /usr/local/mysql and run the mysql_install_db script. Use commands similar to these:

groupadd mysql
useradd -g mysql mysql
cd /usr/local
gunzip < /path/to/mariadb-VERSION-OS.tar.gz | tar xvf -
ln -s full-path-to-mariadb-VERSION-OS mysql
cd mysql
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
bin/mysqld_safe --user=mysql &

NOTE: For MariaDB 5.1.32 only the line "scripts/mysql_install_db --user=mysql" should be changed to "bin/mysql_install_db --user=mysql"

After this, remember to set proper passwords for all accounts accessible from untrusted sources, to avoid exposing the host to security risks!

Our MariaDB binaries are similar to the Generic binaries available for the MySQL binary distribution. So for more options on using these binaries, the MySQL 5.1 manual entry on installing generic binaries can be consulted: http://dev.mysql.com/doc/refman/5.1/en/installing-binary.html.

For details on the exact steps used to build the binaries, see the Packaging page.

Debian .deb Files

Here are the commands we used on Debian 5 amd64 to install MariaDB 5.1.42 (other Debian-based distributions should be similar):

sudo apt-get update
sudo apt-get install libdbi-perl libdbd-mysql-perl psmisc
sudo dpkg --install mysql-common_5.1.42-mariadb73_all.deb
sudo dpkg --install libmariadbclient16_5.1.42-mariadb73_amd64.deb libmysqlclient16_5.1.42-mariadb73_amd64.deb \
mariadb-client_5.1.42-mariadb73_all.deb mariadb-client-5.1_5.1.42-mariadb73_amd64.deb mariadb-server_5.1.42-mariadb73_all.deb \
mariadb-server-5.1_5.1.42-mariadb73_amd64.deb

From Source

See the Compiling page for instructions on compiling and installing MariaDB from source.