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



Submit a Comment

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

You May Also Like…

Scam call from “Telstra”

Just had a call from a man with a sub-continental accent from caller ID 0734946596 Told me there was problem with my...

PC Build

I recently built myself a PC using the SilverStone SG13 Case. I am planning to use it as a Hot Spare. So any client...