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
Solved

Mysql Stopped Working and Wont Start

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

829 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