?
Solved

Mysql Stopped Working and Wont Start

Posted on 2006-06-27
5
Medium Priority
?
372 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 22

Assisted Solution

by:NovaDenizen
NovaDenizen earned 500 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 500 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
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 video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

771 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