LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 10-18-2004, 10:53 AM   #1
suziecorbett
LQ Newbie
 
Registered: Oct 2004
Posts: 2

Rep: Reputation: 0
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,
 
Old 10-18-2004, 10:57 AM   #2
apolinsky
Member
 
Registered: Oct 2004
Location: Brooklyn
Distribution: Slackware 13.1,12.1,12.2; Debian Sqeeze; Centos 5,6
Posts: 253

Rep: Reputation: 34
Under Unix (and linux) the spelling should be daemon.
 
Old 10-18-2004, 11:05 AM   #3
suziecorbett
LQ Newbie
 
Registered: Oct 2004
Posts: 2

Original Poster
Rep: Reputation: 0
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?

Thanks.
 
Old 10-18-2004, 12:00 PM   #4
apolinsky
Member
 
Registered: Oct 2004
Location: Brooklyn
Distribution: Slackware 13.1,12.1,12.2; Debian Sqeeze; Centos 5,6
Posts: 253

Rep: Reputation: 34
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
 
Old 10-05-2006, 06:16 PM   #5
melikai
Member
 
Registered: Aug 2006
Distribution: Suse 10.1
Posts: 37

Rep: Reputation: 15
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
 
Old 05-26-2008, 02:04 AM   #6
izan
LQ Newbie
 
Registered: May 2008
Posts: 1

Rep: Reputation: 0
Question 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 not..so if you have some idea...why not you share and help me...

thanks,
 
Old 05-26-2008, 06:09 PM   #7
seraphim172
Member
 
Registered: May 2008
Posts: 101

Rep: Reputation: 15
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

Last edited by seraphim172; 06-25-2008 at 04:32 AM.
 
Old 10-09-2008, 01:24 AM   #8
mianimran
LQ Newbie
 
Registered: Jan 2006
Location: pakistan
Distribution: as 4.18
Posts: 2

Rep: Reputation: 0
error: 'Can't connect to local MySQL server through socket '

Hi,
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.....
 
Old 10-09-2008, 01:52 AM   #9
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,938

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
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.

Last edited by bathory; 10-09-2008 at 01:53 AM.
 
  


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 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: Can't connect to local MySQL server through socket J0sep Red Hat 20 07-13-2011 09:32 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


All times are GMT -5. The time now is 06:10 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration