If you have installed ConfigFirewall on your WHM server, by default CSF will stop TPC traffic on 3306 (MySQL).

Go to WHM -> ConfigServer Firewall -> Firewall Configuration -> All Outgoing TCP Ports & add 3306.

Restart CSF and your done.

References: