This is really a very small how-to, actually more than a how-to is a self note, so I can remember how to setup mysql on a recently installed Slackware server.
You may need to do this if you want to run KDE’s Akonadi on your Slackware, I’ve seen that I needed to do something similar in my Arch Linux PC.
First steps to setup MySQL server on Slackware
Install MySQL on Slackware
You may have MySQL already installed, as it was my case, (I recommend you to install the full Slackware DVD), but in case you do not have it installed, to install it just run:
slackpkg install mysql
That should be run as root.
Create / Copy the MySQL configuration file
Now, you have MySQL installed in your Slackware computer, but there is no configuration file, well, actually there are a lot of configuration file examples, but we need to copy one of them to be the real config file.
ls -l /etc/my*
you will have this:
-rw-r--r-- 1 root root 4780 2010-05-05 15:53 /etc/my-huge.cnf -rw-r--r-- 1 root root 4754 2010-05-05 15:53 /etc/my-large.cnf -rw-r--r-- 1 root root 4765 2010-05-05 15:53 /etc/my-medium.cnf -rw-r--r-- 1 root root 2403 2010-05-05 15:53 /etc/my-small.cnf
Now copy one of them to
/etc/my.cnf which one, will depend on the size of the Databases you are thinking to run on the server.
In my case, for my personal Laptop, I’ll choose the small one, so:
cp /etc/my-small.cnf /etc/my.cnf
Start the MySQL server
sh /etc/rc.d/rc.mysqld start
Create the database
Assign the password to root
/usr/bin/mysqladmin -u root password 'your-pass-here'
Run the secure installation script
Finally prepare the server to start every time you boot the computer
chmod +x /etc/rc.d/rc.mysqld
These does not pretend to be a complete how-to, but these steps worked for me on Slackware and Arch Linux to have a running free of errors MySQL server.