The content of this article is about how to deal with the database connection failure after using the script in Ubuntu system ECS. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Ubuntu system ECS cannot be remotely connected and the database cannot be connected after using the "How to restrict external scanning behavior through firewall policy" script
Ubuntu system After ECS uses the script in "How to restrict external scanning behavior through firewall policies" for security protection, the system cannot be remotely connected or the database cannot be connected. This is because the script restricts external data packet requests. Follow the following operations according to the port you actually use. The situation can be repaired:
1. First look at the current rules. There is no port 22 allowed in the inbound direction.
##2. Add ssh in the incoming direction , after adding, the test can be connected (the same is true for 3306, etc.) Execute command:
ufw allow 22
The above is the detailed content of How to handle the problem of database connection failure after using Ubuntu system ECS script. For more information, please follow other related articles on the PHP Chinese website!