-   Linux - Software (
-   -   ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. (

suziecorbett 10-18-2004 11:53 AM

ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.
Hi There, I am very, very new to Linux. I am using Fedora Core 2. I am attempting to get mysql to work for me. I have looked at previous threads and the solutios don't seem to work for me.

I tried :
chown -R mysql /var/lib/mysql/*
chgrp deamon /var/lib/mysql/*

But i am being told :
chgrp: invalid group name `deamon'

I am desperate to get this working, any help anyone can give me would be hugely appreciated,

Thanks a million,

apolinsky 10-18-2004 11:57 AM

Under Unix (and linux) the spelling should be daemon.

suziecorbett 10-18-2004 12:05 PM

Thanks a million for your response. I changed the spelling, but then when i try to start mysql it is still giving me the same error. Is there anything else obvious that you can thing of that I may not be doing?


apolinsky 10-18-2004 01:00 PM

Are you sure the daemon is running? Many distributions do not start the daemon by default. You might run a test. The actual starting of the daemon is controlled by a script located in the init.d directory. (It will either be /etc/init.d/mysqld or /etc/rc.d/init.d/mysqld). As root attach to that directory and then issue ./mysqld start. If that works, you should modify the startup scripts to automatically start the daemon. Perhaps the easiest way is to use the graphical tools under kde or gnome to modify the services (daemons) that start. Good luck

melikai 10-05-2006 07:16 PM

try this...
I had the same problem, but did you try this. Did you try to go to the yast and try to start the service? It worked for me after 3weeks of struggling

izan 05-26-2008 03:04 AM

Can't connect to local MySQL server through socket '/var/lib/mysql/mysqld.sock' (111)
Hi there,

I'm so new with the linux...i'm trying to create the database using MYSQL..But can't because of this problem :

Can't connect to local MySQL server through socket '/var/lib/mysql/mysqld.sock' (111)....

I try to find the solution but still can if you have some idea...why not you share and help me...


seraphim172 05-26-2008 07:09 PM

This can happen when the user (in the current case user 'mysql') doesn't have permissions to write to the directory where the lockfile should be created.
Either set permissions to the given location so that mysql can write to it, or choose another location by changing the my.cnf file.

run 'ls -l /var/lib' and 'ls -l /var/lib/mysql' to see the ownership and permissions of that directory and it's contents.

Linux Archive

mianimran 10-09-2008 02:24 AM

error: 'Can't connect to local MySQL server through socket '
i am stuck with this error ... its detail is as follows.
1. I installed EL5 then i check for mysql...
[root@localhost Server]# rpm -ivh mysql-*
warning: mysql-5.0.45-7.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package mysql-5.0.45-7.el5 is already installed
[root@localhost Server]#
Q1. Does it mean that mysql is installed or not?
2. I have no entry in /etc/init.d/ for mysql or mysqld.
[root@localhost ~]# /etc/init.d/mysql
-bash: /etc/init.d/mysql: No such file or directory
[root@localhost ~]# /etc/init.d/mysqld
-bash: /etc/init.d/mysqld: No such file or directory
3.When i tried this
mysqladmin -u root password mysqldata
i got [root@localhost ~]# mysqladmin -u root password mysqldata
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!

Kindly advise me.....

bathory 10-09-2008 02:52 AM

First of all you shouldn't reply to such an old post. It's better to create a new one to get the responses that might help you.
Anyway, to answer your question, you need to install also the server package named mysql-server.

All times are GMT -5. The time now is 11:26 AM.