MySQL Daemon failed to start - no mysql.sock file

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

Please try the following and report back:

  1. Reboot the server (or just kill any mysqld process).
  2. Run the following command:
/etc/init.d/mysqld start

or just

service mysqld start

Which is actually the same.

You definitely not need to start myqld_safe manually ...

Reinstalled Fedora 14 with 2 gb more on /var and reinstalled MySQL and everything works now. I'm not quite sure what fixed the issue but everything is working fine now. Thanks for your help.

disabled selinux and reboot

echo "selinux=disabled" > /etc/selinux/conf

init 6

same thing happened and solve it that way .