ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.
Hi
I have installed mysql, using YAST and trying to issue basic commands. But I always get the following error messege. ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) I did check the "/var/lib/mysql/mysql.sock" file but it wasn't there. This can be my problem. However I have no idea how I could re-create the myssql.sock file. Can someone help me please? Thank you in advance. NoviceW |
Sounds like MySQL isn't running, try running 'mysqld_safe &' and see if that fixes things, i'm not sure where it's located on your distribution. But that works for the source release.
|
I'm working with SuSE 9,1 and get the very same error!
so I'm interested too in the solution of this problem! |
thanks!
It perfectly worked! ;) |
NoviceW
|
Mysql error 2002 Can't connect
I also get the error and mysqld is running. I am trying to install a mediawiki and the installation looks for the mysql.sock file in /var/lib/mysql/ directory. The file is in the /tmp/ directory. Not in the other place. I have moved it and Mysqladmin stops working I can configure it to start in a different place but it would be easier to configure the media wiki to run from the original file location /tmp/mysql.sock any help would be welcome
THanks in advance djones@authentidate.com |
I have found a configure file that is in /etc. It has the references to where mysql and clients get there mysql.sock. the file name is my.cnf. When I configured the client to look at the /tmp/mysql.sock the application (mediawiki) finished its self configuration. So off to the races.
|
I don't know how it worked for you guys, but i still can't get mysql to start up again. Can somebody explain a bit more what to do exactly???
The computer shows me that exact same error that you have specified, and i am running red hat 9. |
Quote:
|
mysql connect error 2002
Hi -
I realize this post is rather old... but since it popped up #1 on Google, and since it's been added to several times already... I thought I might just as well add my $0.02: 1. The error "ERROR 2002: Can't connect to local MySQL server through socket" can actually mean a couple of completely different things: a) MySQL isn't running (in which case the socket file won't exist) ... OR ... b) The Linux user doesn't have permissions to access the file 2. The first thing to do, of course, is to verify that mysqld is running. The previous posters discussed that at length. 3. As far as permissions, this worked for me: a) Make sure the socket file is group "mysql": Quote:
[quote] groups users[quote] c) If you're not, add yourself: Quote:
Quote:
Quote:
|
Quote:
|
Hi all
I'm having the same ERROR mensage with my opensuse but the problem is that I haven't this file /var/lib/mysql/mysql.sock what can I do??? |
I found this file was in /tmp/mysql.sock
Quote:
you can find this file in /tmp/mysql.sock.But I don't still solve this questions. |
This link explains this perfectly:-
http://www.tech-recipes.com/rx/762/s...-tmpmysqlsock/ In short. Mysql is expecting to find the socket in a different place. You can specify its location in /etc/my.cnf Code:
[root@localhost ~]# cat /etc/my.cnf It worked immediately. |
Hey guys it was a lot more easy for me to get it to work: the thing was mysql service wasn't running, so the only thing I did was:
$ service mysql start and that was it! after that I could start myslq with no problems I'm using opensuse 11.2 |
All times are GMT -5. The time now is 05:06 PM. |