Solved

Mysql Stopped Working and Wont Start

Posted on 2006-06-27
5
369 Views
Last Modified: 2008-03-10
Today Mysql Stopped working. It wonr restart or start.

This is the error that cpanel gives when trying to restart the service:

/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").
0
Comment
Question by:speednow
  • 2
  • 2
5 Comments
 
LVL 22

Assisted Solution

by:NovaDenizen
NovaDenizen earned 250 total points
ID: 17002643
That doesn't look like it is trying to restart the service.  Instead, it looks like it is attempting to communicate with an already running service, and failing.  Have you tried starting mysqld back up?
0
 

Author Comment

by:speednow
ID: 17005391
service mysql restart
No mysqld pid file found. Looked for /var/lib/mysql/lserver4.speedlinux.com.pid.

service mysqld restart
mysqld: unrecognized service


0
 
LVL 22

Expert Comment

by:NovaDenizen
ID: 17005517
What does your mysql.error log file say?

Is there a mysql process running?

Maybe you need to 'start' instead of 'restart'.  I'm used to running init.d scripts for this sort of thing.
0
 

Author Comment

by:speednow
ID: 17005592
Where can i find that error log?
0
 
LVL 1

Accepted Solution

by:
Raigis earned 250 total points
ID: 17007850
i think that the socket file is place in one place and system is looking for it in other place.

one way...
make sure that socket file is setup correctly:
* check "socket" variable in /etc/my.cnf" file
* check that service startup init script (somewhere in /etc/init.d/mysql) starts mysql with correct --socket option

or another way...
i would recommend to create a soft link.
lets say that socket file is placed in /tmp/mysql.sock now. and we see that system is complaining becouse it cannot find '/var/lib/mysql/mysql.sock'. so, lets create a link:
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question