On Mon, Mar 4, 2024 at 12:43 PM Tim Moody tim@timmoody.com wrote:
I am trying to reach a remote mysql database from a vps using python. The destination server has created an opening in the firewall for the request, but I am still getting network unreachable errors. I gave the ip of the proxy for the vps, obtained with ping, as the expected ip. I now tried accessing a web site I control from the same vps also in python using requests.get, and in the web server log I see the request coming from what looks to be a gateway (xxx.xxx.xxx.1, rather than the proxy xxx.xxx.xxx.nnn) Is this to be expected and can I rely on the address for such requests?
Please, please, please do not expose MySQL/MariaDB to the general internet. Instead I would suggest that you use an ssh tunnel to connect your workstation with the remote instance. See https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#Connecting_to_th... for how this can be done in a specific case. For your case really just the target host (login.toolforge.org -> your instance) and database server should need to change.
Bryan