Problem Description
solution
First, confirm their security group permissions
You need to configure security group permissions for your database in the RDS, that 3306
ports need to be open to the host EC:
Among them, select the type MYSQL/Aurora
, so you can open the 3306
port, the source is defined as my host IP and EC where security group. (Just type the host name, AWS can automatically adapt)
Second, turn off the security-enhanced Linux (SELinux)
AWS EC SELinux is enabled by default so that the server can not access external MySQL PHP culprit. Use root
the user to modify the host EC /etc/selinux/config
document:
1 |
SELinux = disabled |
EC reboot the host, re-open the httpd service can be.
Original link large column https://www.dazhuanlan.com/2019/08/15/5d551400cb323/