Starting Mysql on Slackware 12
So the other day I decided to upgrade to Ubuntu Hardy Heron, and after a few days of testing it out I was getting some very strange memory leaks. Also, there were “zombie” processes hanging under “sh” that I couldn’t probe. Fed up with current circumstances in the bloated-Linux-world, I decided to switch back to the tried and true - after all I really had no reason to not switch back other then my undeniable hatred for the Lilo bootloader.
I got over it, and got it up and running late last night. This morning I got the latest nvidia drivers running, as well as my adjusted my sound card levels. Much to my suprise this sound card (Audigy 2) works great under slack.
My first hurdle was getting mysql to start.. I kept getting a nohup error and it wasn’t allowed to connect to the mysql socket. First things first, permissions and users.. make sure the server isn’t running:
ps xa | grep mysql
You should only see your grep process in the list of processes and you’re good to move on.
sudo chown -R mysql:mysql /var/lib/mysql/ sudo chown -R mysql:mysql /var/run/mysql/
Next we need to get our config in place:
sudo mv /etc/my-small.cnf /etc/my.cnf
After that we can run the database installer:
sudo /usr/bin/mysql_install_db
Once that is complete, we can start up the server:
sudo /usr/share/mysql/mysql.server start
We’ll also want to move the mysql script to our rc.d folder so that it can be started upon boot:
sudo cp /usr/share/mysql/mysql.server /etc/rc.d/rc.mysql sudo chmod 644 /etc/rc.d/rc.mysql
Lastly we’ll create a new password for the root user in mysql:
sudo /usr/bin/mysqladmin -u root password 'your password here'
That’s all, you should now be able to connect to the server just fine. If you need any help with Mysql commands and command-line syntax check this out.