Social Icons

Wednesday, October 14, 2015

Can't connect to mysql server on 'some_server'

I had this problem when installing a site on a CentOS server, connecting to a database on another server. It was giving the error as Can't connect to mysql server 'another_server'.

It turned out the connection to the database was being prevented by SELinux.

Issuing the following command (as root) told SELinux to allow the connection:
setsebool httpd_can_network_connect_db=1

No comments:

Post a Comment

Total Pageviews