CakePHP – SQLSTATE[HY000] [2002] Permission denied

Written by James McDonald

June 28, 2017

Just saw this error and usually this is due to having a misconfiguration in the database connection options. But I am running Fedora 25 with seLinux enabled by default.

First to test if it’s seLinux causing an issue


sudo setenforce 0

If it works fine with seLinux disabled then do the following:


sudo setsebool -P httpd_can_network_connect 1

# turn seLinux back on

sudo setenforce 1

Should now work

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Clear HSTS Settings in CHrome

Open chrome://net-internals/#hsts enter the domain in the query field and click Query to confirm it has HSTS settings...

Ubuntu on Hyper-v

It boils town to installing linux-azure # as root or sudo apt-get update apt-get install linux-azure...