Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 08-09-2005, 10:59 PM   #1
LQ Newbie
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
Angry mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.


I have been researching without any luck about this problem. I have read many solutions to this problem but they did not work for me.

Problem: I am getting the following error when I try to run mysql.
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

1- Please note that I am running as root.
2- I am using Mandrivia 2005 limited edition (I selected mysql when I installed my OS)
3- I do not find neither mysql directory under var/lib not mysql.sock

Any help from the OSC (open source community) will be appreciated.

Old 08-09-2005, 11:06 PM   #2
LQ Newbie
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
chown mysql.mysql <directory>
Old 03-24-2006, 07:51 AM   #3
LQ Newbie
Registered: Mar 2006
Posts: 4

Rep: Reputation: 0

I installed Red Hat Linux 3 in my system which had given Apache, PHP and mysql 3 by default. But, when I tried to give the command '#mysqld' it has given some socket error(mysql.sock). What I did is, I downloaded mysql 5.0 RPM's from the site '' and installed it. And now, when I tried to connect to server, using '#mysqld', the error I got is:

"[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!"

And when I type the following command,

#rpm -q mysql-server
package mysql-server is not installed.


if I try to reinstall using mysql server rpm,
it says that the package is already installed.

Can somebody please help in solving this problem.
I am new to Linux Environment.
Please suggest me to sort out this problem.

If at all repairing this problem is not possible, can somebody suggest how to uninstall mysql, so that I can try it out once again by installing.

Old 03-24-2006, 09:44 AM   #4
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Hi, your question is different from what the original poster was asking, its probably better to start your own thread so that it get more exposure.

Last edited by reddazz; 11-13-2007 at 11:10 AM.


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
Buzilla issue: "Can't connect to local MySQL server through socket '/tmp/mysql.sock'" vitopn Linux - General 3 05-21-2007 11:13 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration