Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get phpMyAdmin working, connecting locally to mysql from Centos 6.3 running in VMWare Player.

mysqladmin -u root -p status indicates that mysql is running.

Both my.cnf and point to socket `/var/lib/mysql/mysql.sock``.

I've tried and localhost.0.0.1/phpMyAdmin.

In both cases I get the message:

#2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
The server is not responding (or the local server's socket is not correctly configured)

Can anyone tell me what else to check?

share|improve this question

You need to set the appropriate SELinux boolean to allow the web server to communicate with MySQL.

setsebool -P httpd_can_network_connect_db 1
share|improve this answer
That didn't do it, but I've confirmed that turning off SELinux altogether does. Is there some other setting I'll need to change too? – sandhi Mar 25 '13 at 4:40
Sorry, I missed your comment. Check the audit log /var/log/audit/audit.log and see what's logged when you attempt this access. – Michael Hampton May 19 '13 at 22:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.