Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 config.inc.php point to socket /var/lib/mysql/mysql.sock

I've tried 127.0.0.1/phpMyAdmin 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? Thanks!

share|improve this question
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.