Solved

Mysql Stopped Working and Wont Start

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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Loading csv or delimited data files to MySQL database is a very common task frequently questioned about and almost every time LOAD DATA INFILE comes to the rescue. Here we will try to understand some of the very common scenarios for loading data …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

20 Experts available now in Live!

Get 1:1 Help Now