Solved

Mysql Stopped Working and Wont Start

Posted on 2006-06-27
5
366 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now