Change iptables
to look like this instead:
target prot opt source destination
ACCEPT tcp -- 127.0.0.1 0.0.0.0/0 tcp dpt:3306
ACCEPT tcp -- 107.22.*.* 0.0.0.0/0 tcp dpt:3306
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
Otherwise, all 3306 traffic gets dropped by the firewall.