LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-09-2011, 07:09 PM   #1
jastanle84
LQ Newbie
 
Registered: Oct 2011
Posts: 8

Rep: Reputation: Disabled
MySQL Daemon failed to start - no mysql.sock file


The mysql.sock file that is supposed to be located at socket=/var/lib/mysql/mysql.sock on the my.cnf file, is not there. I ran the command:

Code:
mysqld_safe --user=mysql &
to restore the file and then I ran:

Code:
service mysqld start
The service starts and the file is created correctly but it does not persist after reboot. The file disappears after reboot. What do I need to do to keep the mysql.sock file in the /var/lib/mysql.sock directory after reboot? Any help is appreciated.
 
Old 10-09-2011, 07:21 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hello,

What distribution are you running? When you reboot, most likely the mysqld service is not being started. You need to use chkconfig in order to get it to run in run level 5. Run the following:
Code:
chkconfig mysqld on
Cheers,

Josh
 
Old 10-09-2011, 07:56 PM   #3
jastanle84
LQ Newbie
 
Registered: Oct 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
Ran chkconfig

I ran the:

Code:
chkconfig mysqld on
after I ran the following in run level 5:

Code:
mysqld_safe --user=mysql &
service mysqld start
I am in Fedora 14 and MySQL community edition 5.1.

I did a reboot and the service still did not start after the reboot and the mysql.sock file was missing again. Any more suggestions?
 
Old 10-09-2011, 08:22 PM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Go into Applications, System, Services - Within the services config GUI, scroll down to mysqld and check and make sure that it is supposed to run for run level 5.
 
Old 10-09-2011, 08:30 PM   #5
jastanle84
LQ Newbie
 
Registered: Oct 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
The mysqld service starts in run level 2-5

The services say that mysqld is set to startup in run level 2-5. Any other suggestions?
 
Old 10-09-2011, 09:14 PM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
After you double check that it is supposed to run in run level 5, reboot, and run the following:
Code:
ps aux | grep mysql
This will check if it is running or not in the background. I want to check this before we go any deeper with this issue....
 
Old 10-09-2011, 09:31 PM   #7
jastanle84
LQ Newbie
 
Registered: Oct 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
my.cnf file

Here is the output 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 ran ps aux | grep mysqld after reboot in run level 5 and this is what I get:

Code:
500   2273 0.0 0.0 4412 732 pts/0 S+ 22:23    0:00 grep --color=au
to mysqld
I hope this helps in solving my issue.
 
Old 10-10-2011, 09:09 AM   #8
jastanle84
LQ Newbie
 
Registered: Oct 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
Question Bumping this thread for help

bumping this thrad for help.
 
Old 10-10-2011, 12:44 PM   #9
jastanle84
LQ Newbie
 
Registered: Oct 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
Reinstalled Fedora and MySQL

Reinstalled Fedora 14 and added 2 gb to /var. Reinstalled MySQL and everything is working fine now. Not quite sure what the problem was. I'm marking this thread as solved. Thanks for your help Corp769.
 
Old 10-10-2011, 02:54 PM   #10
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Sorry for the late reply, I have a kid and he takes up a lot of my time. Glad to see you got it to work though.... It was probably a misconfigured option within chkconfig or something of that sort.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Daemon failed to start. zushiba Linux - Software 24 08-29-2013 09:15 PM
Is it possible to manufacture a mysql.sock socket file MySQL will like? brianpbarnes Linux - Server 6 04-12-2012 05:01 AM
HTTPD: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' markseger Fedora - Installation 2 02-09-2011 11:53 PM
Slack13 - Can't start mysql; can't find mysql.sock? Jayla Linux - Newbie 11 11-25-2009 06:10 AM
Fedora 9:No mysql.sock file found. Cannot start mysql smilingbuddha Linux - Software 3 03-21-2009 03:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration