LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-24-2011, 01:32 PM   #1
2ku
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Rep: Reputation: 0
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysq


I have an e-mail production server that has been running fine for almost two years.

Notice mail was not serving today and login to a bunch of errors in messages

However, I think they are all from not being able to access MySQL and when I:

mysql -u root -p

I get:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
 
Old 04-24-2011, 02:20 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
This normally means mysql is just not running, but you clearly need to explore more on the mysql side. It's obviously up to you to appreciate what parts of the system need looking at.
 
Old 04-24-2011, 03:24 PM   #3
2ku
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Original Poster
Rep: Reputation: 0
I am clueless so could use some direction.

When I attempt to start mysql I get:


15:24:28 root@email2 /etc/init.d > ./mysql start
./mysql: line 232: ./mysql: No such file or directory
Starting service MySQL done
 
Old 04-24-2011, 03:31 PM   #4
2ku
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Just for anyone in the same boat I found the issue, pretty obvious:


15:24:31 root@email2/etc/init.d > df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 228G 222G 0 100% /
udev 2.0G 80K 2.0G 1% /dev
 
Old 05-18-2011, 04:02 PM   #5
donaldg74
LQ Newbie
 
Registered: Dec 2005
Posts: 2

Rep: Reputation: 0
You might try removing the space character after -u
Should be "mysql -uroot -p"
 
Old 05-18-2011, 04:17 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by donaldg74 View Post
You might try removing the space character after -u
Should be "mysql -uroot -p"
Erm, no, that's totally not relevant. Not least because this thread was already found to be a full disk.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysq mimique Linux - Software 23 08-14-2012 06:14 AM
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysq barbyb Linux - Software 3 08-23-2011 04:59 AM
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/my.. Goce Linux - Server 3 11-30-2008 09:57 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Software 3 06-28-2007 11:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration