Configuring MariaDB on Slackware 14.1

Published: {ts '2013-12-28 00:00:00'}
Author: Steven Neiland
Site Url: http://www.neiland.net/article/configuring-mariadb-on-slackware-14-1/

The recent release of Slackware 14.1 comes with a few improvements. One of which is that it now uses MariaDB in place of MySQL. MariaDB is basically the same database as MySQL just not tied to Oracle in any way (it even still uses mysqld as its daemon name).

However when you start slackware you will still see an error that mysql could not be started.

mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended

Assuming that you selected to install the MySQL service when you setup slackware you are 99% the way to getting it up and running. Most of the configuration we had to do previously in slackware is unnecessary but there are still a few steps.

Step 1: Install system database

MariaDB still needs us to run the install script to setup its own internal database.

mysql_install_db

Step 2: Setup ownership permissions

Obviously will need to give the mysql user ownership of the required mysql files.

chown -R mysql.mysql /var/lib/mysql

Step 3: Start MariaDB

We can now start MariaDB

/etc/rc.d/rc.mysql start

Step 4: Setup Root user password

As a final step set a root user password.

mysqladmin -u root password '[new-password]'