Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-22-2012, 01:32 AM   #16
LQ Newbie
Registered: Feb 2012
Posts: 2

Rep: Reputation: Disabled
unable to connect mysql server

only u need to restat ur mysql server typing given command through ur terminal
sudo /etc/init.d/mysql restart
....its start working enjoy
Old 12-10-2012, 02:34 AM   #17
LQ Newbie
Registered: Jul 2012
Posts: 3

Rep: Reputation: Disabled
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

I am getting the same problem
I am working on Fedora 17
actually i am installing bugzilla
bugzilla is installed but when i try to open bugzilla from URL(http://{IP address}/bugzilla/) I am getting error

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

from Bash I type
service mysqld restart
it give O/P:

Redirecting to /bin/systemctl restart mysqld.service
Old 09-17-2014, 02:13 PM   #18
LQ Newbie
Registered: Jul 2014
Distribution: openSuse 12.2, SLES11.3, RHEL 5,
Posts: 15

Rep: Reputation: Disabled

hi folks,
this comment is just because again and again people are looking for their mysql socket file:

if the mysql.sock is not existent, and you get an error like this:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
this is a good hint on the mysql process not running. The socket file is created as soon as you start the mysql server process, and is deleted as soon as you stop it.

how to check for mysql processes:
ps -ef | grep mysql
this will show you all mysql processes running, at least there should be two of them:
mysqld_safe and mysqld. If there is none of them, then don't expect to have a mysql.sock. You'll need to start mysql then.

how to start the mysql server processes:
when installing mysql on your Linux, there is a startscript generated. usually located in /etc/init.d,
so you can start with /etc/init.d/mysql start
and stop with /etc/init.d/mysql stop

Last edited by MfromH; 09-17-2014 at 02:16 PM.


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
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
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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:20 PM.

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