Bug #62669 mysql.sock file does not persist across reboots in Fedora 14
Submitted: 10 Oct 2011 14:43 Modified: 11 Oct 2011 1:54
Reporter: Jeffrey Stanley Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:5.1 OS:Linux (Fedora 14)
Assigned to: CPU Architecture:Any
Tags: mysql.sock file does not persist across reboots in Fedora 14

[10 Oct 2011 14:43] Jeffrey Stanley
Description:
After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the:

mysql command

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

So, I did some research and found that the mysql.sock file was not getting created. I found that I could use the following command to create the mysql.sock file with the appropriate permissions:

mysqld_safe --user=mysql &

I was able to start the service with the following command:

service mysqld start

The service started right up. When I did a reboot the service would not start and the mysql.sock file was not there again. I did all the above again except I add the following command:

chkconfig mysqld on

I restarted the machine and the service was not started and the mysql.sock file was not there. I checked Services in Fedora and found that the mysqld daemon runs in levels 2-5. I ran the following command:

ps aux | grep mysqld

this is the output of that command:

500   2273 0.0 0.0 4412 732 pts/0 S+ 22:23    0:00 grep --color=au
to mysqld

Here is a copy of my.cnf file:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
#Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links = 0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

I believe there is a bug in either MySQL or Fedora 14 and I would like to know a resolution if there is one.

How to repeat:
Install MySQL 5.1 from Fedora 14 with the following command:

yum install mysql mysql-server
[10 Oct 2011 20:16] MySQL Verification Team
Is there an error/warning message in the log error file?. Thanks.
[11 Oct 2011 1:54] Jeffrey Stanley
I reinstalled Fedora 14 and MySQL and everything worked fine. Not sure what happened. I guess I reduced the space in opt and increased the space in var and that may have fixed the issue.