This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== D) MariaDB / MySQL ====== [[https://mariadb.org/|MariaDB]] is the successor to [[https://www.mysql.com|MySQL]] after Oracle went a bit crazy on it. MariaDB is more updated, more secure and generally the logical successor to MySQL. And it's 100% compatible. Installing MariaDB is easy: <code bash> emerge mariadb </code> ===== Configuration ===== The [[https://wiki.gentoo.org/wiki/MariaDB|Gentoo guide]] says it all, but i want to ensure that the database is actually stored on the RAID array and not on the Gentoo root folder. This is configured in **/etc/mysql/mariadb.d/50-distro-server.cnf**, find and change the following line: <code> datadir = /data/mysql </code> move the folder to somewhere under **/data/**. After editing this file, run the first time configuration, so before starting it, run: <code bash> emerge --config dev-db/mariadb </code> Input and **remember** your root password! ===== Startup ===== Start the service and set it on boot: <code bash> rc-update add mysql default /etc/init.d/mysql start </code> ===== Management ===== It's a good idea to create a separated database and user for each service you are oging to use with MariaDB. These instructions are not exaustive but only a quick reference: **Login to the MariaDB** <code bash> mysql -u root -p -h localhost </code> **Creating a database with user** <code> create database DATABASE_NAME; grant all privileges on DATABASE_NAME.* TO 'USER_NAME'@'localhost' identified by 'PASSWORD'; flush privileges; </code>