LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-20-2003, 04:26 AM   #1
studentforever
LQ Newbie
 
Registered: Jun 2003
Posts: 27

Rep: Reputation: 15
mysql


what does this error mean
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
 
Old 07-20-2003, 05:06 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Usually that you haven't started mysql server before trying to connect to it.

Cool
 
Old 07-20-2003, 10:15 PM   #3
studentforever
LQ Newbie
 
Registered: Jun 2003
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks
 
Old 07-21-2003, 01:28 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You're welcome, so did you get it working?

Cool
 
Old 07-23-2003, 03:13 PM   #5
studentforever
LQ Newbie
 
Registered: Jun 2003
Posts: 27

Original Poster
Rep: Reputation: 15
I tried to start it...mysql start, however its giving me the same error with cannot connect to localhost
 
Old 07-28-2003, 01:55 PM   #6
MOMO Angel77
LQ Newbie
 
Registered: May 2003
Location: USofA
Distribution: SuSe 8.1
Posts: 7

Rep: Reputation: 0
Unhappy same error...

I'm getting the same error you had at the begging of your post. did you ever get rid of it?
i looked around for an answer and the closest i found was instructions on how to start myslq- so i followed these by going to ...
init.d/mysql start
but that still just gave me this same error...what am i missing?
 
Old 07-28-2003, 06:59 PM   #7
studentforever
LQ Newbie
 
Registered: Jun 2003
Posts: 27

Original Poster
Rep: Reputation: 15
yes, i started the daemon the mysql daemon
 
Old 07-29-2003, 03:38 AM   #8
piti
LQ Newbie
 
Registered: Jul 2003
Distribution: mdk, rh
Posts: 11

Rep: Reputation: 0
@MOMO Angel77
there are more possibilities why you cannot connect to mysql with the client
a) mysql is not running - check the logs for more info
b) wrong permissions for the mysql.sock - well now you know what to do ;-)
c) server is running, your client is just awaiting the socket in the location specified in the error message, but the server daemon creates it in some other location - this is very easy to solve using the /etc/my.cnf config file, you add "socket = /path/to/mysql/socket" either in the [client] section or in the [mysqld] section of /etc/my.cnf, where "/path/to/mysql/socket" must be set according in which section you put it, when in the [client] section - set it to the path mysql.sock reside, when in the [mysqld] to path clients look for the socket file, in your case "/var/lib/mysql/mysql.sock"
 
  


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: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 03:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 08:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-08-2008 12:48 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM


All times are GMT -5. The time now is 07:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration