XF 2.2 SQL connection: Permission denied


New member
Hello, I've just got the Xenforo 2.2 and installed it on my OVH vps.
The installation steps have successfully reached the part of connecting to the SQL database, however when I enter my MySQL database credentials I receive the error:

"The following error occurred while connecting to the database:
Permission denied
This indicates that your configuration information is not correct. Please check the values you have entered. If you are unsure what values are correct or how to proceed, please contact your host for help. These values are specific to your server."

The database URL I am using is an rds.amazonaws.com url pointing to my database, the username, password, port and schema are certainly correct as I am able to login using the same credentials with SQL workbench and access the scheme and create tables and the user has every permission possible for this schema.

I have tried turning off all firewalls running on the server and I have no idea why I am getting a "Permission denied" error.

Can someone please help me out? Thanks in advance.



New member
Sorry, fixed it.
Looks like running setsebool -P httpd_can_network_connect_db 1 was the issue.

May I suggest an improvement for showing the entire error message if something like this occurs? The only reason I managed to figure this out is because I manually renamed config.php.default to config.php and saw the full stack trace, and was then able to look up why errors were coming from this line:

$this->connection = $this->makeConnection($this->config);