To test this, you can use telnet:
shell> telnet <mysql ip> 3306# if telnet is not installed you can install it or use nc (netcat)
If telnet hangs or the connection is refused, it means that the port is closed. Please note that if you see an output like this, it means that the port is not blocked:
shell> telnet 18.104.22.168 3306Trying 22.214.171.124...Connected to 126.96.36.199.bc.googleusercontent.com.Escape character is '^]'.FHost '188.8.131.52' is not allowed to connect to this MySQL serverConnection closed by foreign host.
It means that the port is open but MySQL is restricting the access.
When creating users, avoid giving access from anywhere (the % option). Restrict access to an IP range or subdomain. Also restrict ...