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.