Forums

Connecting to my remote Database

I tried to connect to my remote Mysql Databse (on Hostgator) from my Python App but I get the 500 Internal Server Error everytime. What is the problem?

What does it say in your error log? You'll find a link to it on your web tab...

In the Error Log File - It says: OperationalError: (2003, "Can't connect to MySQL server on '[DB Host IP]' (111)")

Can you connect to it from a Bash console using the normal mysql command-line?

I just tried it now and it says: ERROR 2003 (HY000): Can't connect to MySQL server on 'DB Host IP' (111)

'DB Host IP' doesn't look like a real IP address or hostname for the database?

sorry, I meant of course the IP address of my host (hostgtor) which is 192.254.186.195

Ah, I know what the problem is. Free users have restricted internet access -- you can access a whitelist of websites over HTTP/HTTPS, but other network protocols aren't allowed. So you won't be able to make a connection to a mysql server on port 3306, unless you upgrade your account I'm afraid...

You're welcome to use our mysql service if you like? It's free...

oh! ok :(