I can’t get MySQL to work because of some sock error!

This is posted for those of us that use Slackware from time to time.

Take a deep breath…no wait. Take 5 deep ones.
Think happy thoughts.
Try the folowing:

su mysql
mysql_install_db

It could also be that your mysql libs are not ‘owned’ by your mysql user or that your mysql.sock file isn’t linked correctly. To correc this, try the following via shell

su root
ln -s /var/run/mysql/mysql.sock /tmp/mysql.sock
chown mysql /var/lib/mysql/*
chown mysql /var/lib/mysql/mysql/*

Now start mysql like this:

/etc/init.d/mysql start

If you can’t start it, change the file to start automatically during bootup and restart

chmod 755 /etc/rc.d/rc.mysqld
shutdown now
reboot

Author: devnet

devnet has been a project manager for a Fortune 500 company, a Unix and Linux administrator, a Technical Writer, a System Analyst, and a Systems Engineer during his 20+ years working with Technology.

Creative Commons License
Except where otherwise noted, the content on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.