We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I spent a boatload of time trying to figure out why my web page couldn't connect to the DB.
First I realized that I needed to use an IP address in both the Mysql user permissions and the mysqli_connect call.
mysqli_connect
But it was still giving me this error on the web page.
2003:Can't connect to MySQL server on '192.168.86.54' (13)
I tried installing MySQL on the web server and was able to connect using the mysql client.
mysql
Finally I found this Stackoverflow article which said to set
setsebool -P httpd_can_network_connect_db=1
That worked. I ended up using this in my playbook.
- selinux: state: disabled
The text was updated successfully, but these errors were encountered:
The below command did the trick for me. Reference stackoverflow
sudo setsebool -P httpd_can_network_connect 1
Sorry, something went wrong.
I spent a lot of time debugging this too, here is the setsebool command as a task:
setsebool
- name: Allow httpd to connect to DB over the network seboolean: name: httpd_can_network_connect state: true persistent: true become: true
No branches or pull requests
I spent a boatload of time trying to figure out why my web page couldn't connect to the DB.
First I realized that I needed to use an IP address in both the Mysql user permissions and the
mysqli_connect
call.But it was still giving me this error on the web page.
I tried installing MySQL on the web server and was able to connect using the
mysql
client.Finally I found this Stackoverflow article which said to set
That worked. I ended up using this in my playbook.
The text was updated successfully, but these errors were encountered: