MySQL cant connect to remote database - centos

From the terminal, enter this

setsebool httpd_can_network_connect=1