Visit Our UNIX and Linux User Community


MySQL Daemon failed to start - no mysql.sock file

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications MySQL Daemon failed to start - no mysql.sock file
# 1  
Old 10-10-2011
MySQL Daemon failed to start - no mysql.sock file

After doing a
Code:
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:
Code:
mysql

Code:
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:
Code:
mysqld_safe --user=mysql &

I was able to start the service with the following command:
Code:
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:
Code:
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:
Code:
ps aux | grep mysqld

this is the output of that command:
Code:
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:
Code:
[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.
# 2  
Old 10-10-2011
Please try the following and report back:

1. Reboot the server (or just kill any mysqld process).
2. Run the following command:

Code:
/etc/init.d/mysqld start

or just

Code:
service mysqld start

Which is actually the same.

You definitely not need to start myqld_safe manually ...

Last edited by radoulov; 10-10-2011 at 12:22 PM..
# 3  
Old 10-10-2011
Reinstalled Fedora and MySQL

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.
# 4  
Old 10-12-2011
disabled selinux and reboot
Code:
echo "selinux=disabled" > /etc/selinux/conf

init 6

same thing happened and solve it that way .

Last edited by radoulov; 10-12-2011 at 04:11 PM.. Reason: Code tags!

Previous Thread | Next Thread
Test Your Knowledge in Computers #153
Difficulty: Easy
Novell sold their Unix business operations to Microsoft in 1995.
True or False?

8 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Mysql missing mysqld.sock (Linux)

I am trying to start a server for a class I am in but... mysql won't start with this error ( ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ) ---------- Post updated at 03:51 PM ---------- Previous update was at 03:50 PM ---------- ... (2 Replies)
Discussion started by: Slayer939
2 Replies

2. Red Hat

MySQL (mysqld) fails to start!

Hello, I have recently installed MySql and I encourage an error. I am using Fedora 15 and when I am trying to start mysqld service i am getting the following error message: Starting mysqld (via systemctl): Job failed. See system logs and 'systemctl status' for details. If I try to start it... (4 Replies)
Discussion started by: dot_pro
4 Replies

3. Linux

mysql server start issue

Hi, I have installed mysql in linux box as mysql-5.0.77-4.el5_6.6.. I would like to start the server. But there is no mysql file in this location /etc/init.d/ Please advice how to start the server now !! Thnaks, Mani (5 Replies)
Discussion started by: Mani_apr08
5 Replies

4. UNIX for Dummies Questions & Answers

[SOLVED] mysql.sock is missing..

mysql.sock file is missing in /opt/lampp/etc/ is there any backup file available in unix... since without that file .. project is not opening.. reply me as soon as possible ... (19 Replies)
Discussion started by: senkerth
19 Replies

5. Programming

MySQL service start error

Hi, I have installed MySql version 5.0.67 in RedHat LINUX version 5. The installation completed successfully. When I am trying to start the service an error occured the error shown below ".......Manager of pid-file quit without updating file" Can anyone help me to fix the problem.... (4 Replies)
Discussion started by: saravanakumar
4 Replies

6. UNIX for Dummies Questions & Answers

Starting MySQL daemon

I'm running a FreedBSD server with mysql 4.1. When I start mysqld via the command: # /usr/local/bin/safe_mysqld --user=mysql it starts the mysql db (I know because the websites are running off of it) but does not return to a prompt, it will let me type but will not respond unless I restart... (15 Replies)
Discussion started by: unispace
15 Replies

7. UNIX for Advanced & Expert Users

mysql would not start: missing mysql.sock

I recently installed mysql-standard-5.0.21-solaris9-sparc-64bit.pkg on a Solaris 9 machine (SunOS 5.9 Generic_118558-19 sun4u sparc SUNW,Ultra-250). The package installation went very smooth, however, starting mysql is a different story. I get the message below everytime I try to start mysql: #... (2 Replies)
Discussion started by: xnightcrawl
2 Replies

8. UNIX for Advanced & Expert Users

MySQL problem >> missing mysql.sock

MySQL on my server is down.... I figured out that the mysqld process isn't running. When I try to run it, it says it can't find mysql.sock Any suggestions? Here's what I can't do: can't be root don't have physical access (do stuff via SSH) reinstall MySQL (need to keep the current MySQL... (8 Replies)
Discussion started by: _hp_
8 Replies

Featured Tech Videos