The best way to disconnect external connections to your MySQL is to install it bind-address=127.0.0.1in the my.cnfconfiguration file. If you still need to block MySQL external access using the firewall, you delete or reject all packets sent to port 3306.
source
share