Configuring MariaDB on Slackware 14.1

Author: Steven Neiland

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

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/ 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.


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]'

Related Blog Postings

Reader Comments

JDelaporte's Gravatar
Monday, June 16, 2014 at 4:04:38 PM Coordinated Universal Time

Thanks for the article! It was helpful to get back to the basics. I was buried in errors trying to set up a MariaDB a few minutes ago. I found an additional hint that helped at digitalocean. I was getting InnoDB errors, and fixed them by adding the following to my.cnf:

# Added these two lines recommended by

Also, it worked for me to run the following command to create the database and set up ownership of the data directory simultaneously:
# mysql_install_db --user=mysql

Zax's Gravatar
Monday, February 26, 2018 at 10:59:50 PM Coordinated Universal Time

Thank you for the assistance here! Smooth sailing! I am not sure if I had the same Slackware 14.1 as you or not, but on my install, the command was /etc/rc.d/rc.mysqld start. Thanks again for the info! First time playing with Slackware. It's growing on me quickly.

Don's Gravatar
Monday, November 26, 2018 at 9:22:42 PM Coordinated Universal Time

Almost perfect, for me step #3 needed to be: /etc/rc.d/rc.mysqld start (note the added 'd' was missing). Thanks so much for a clear easy to follow setup. This was on Slackware64 current, from 11/26/18, got tired of waiting for 15 to drop and needed to update everything. Thanks again!

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain advertisments or appear to be created for the purpose of link building, will not be published.

Archives Blog Listing