Forums

connect to remote mysql db from paid account

I have a paid account ("hacker") to host some python scripts, and I want to script to connect to a remote MySQL server. I have whitelisted my IP at home, and both www.pythonanywhere.com and eu.pythonanywhere.com with my hosting provider for the mysql db (the python code runs on the EU PA site).

If I test this from my laptop, it all works. However, from the PA sites is does not work. For the US site this could be related to my free account there, but at the EU site I have a paid account and I understood that should work.

The problem is likely related to the server which tries to connect, I see that it is an AWS service, resulting in the error Host 'ec2-18-197-67-125.eu-central-1.compute.amazonaws.com' is not allowed to connect to this MariaDB server. That's indeed correct.

Of course I can whitelist this particular server, but I don't know if the code gets executed every time from this AWS server. So my question: what EU PA server / domain should I whitelist to guarantee that connecting to the mysql db will consistently work?

Thanks,

Pieter

By coincidence, the previous thread on the forums has the answer :-). Check out this post.

ah, thanks, that’s a post that I never would have checked given the title, will do now ! :-)

Fair enough, hope that helped, though!