LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 03: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, 04:06 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

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

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

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

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

Cool
 
Old 07-23-2003, 02: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, 12: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, 05: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, 02: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10: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
Open Source Consulting | Domain Registration