0

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?

peterh
  • 4,953
  • 13
  • 30
  • 44
sandhi
  • 1
  • 1
  • 1

1 Answers1

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
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • 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 04: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