I have a remote mysql server that I want to connect to. I added my local IP address to ufw and am able to connect to the remote mysql server from my local machine.
However, when I try to connect to the mysql server from a second cloud server, I can't connect. I get this error:
ERROR: Error while retrieving users: SQLSTATE[HY000] [2002] Connection timed out (Connection: remote_mysql, SQL: select * from
users)
Which is the same error I can reproduce on local if I remove my IP address from ufw. So, the problem is, the IP address of the cloud server being added to ufw doesn't solve the problem. It is possible that the server IP is being proxied by the network of my cloud provider, and unfortunately they're unable to help me. Yes, I am going to switch providers, but I want to solve the problem for now which is that this failed attempt to connect doesn't show up in any of my logs.
It should be possible for me to see somewhere that a remote server is trying to connect to my mysql server, but that's the thing: it doesn't show up anyhere. Not in the mysql logs, ufw logs, syslog, or kern.log. Why not?