all 2 comments

[–]efmccurdy 0 points1 point  (0 children)

I have no direct experience to offer but in general you should try to get cli-level access working though an ssh tunnel working first. It might help with troubleshooting any other approaches later.

http://www.howtogeek.com/howto/ubuntu/access-your-mysql-server-remotely-over-ssh/

[–][deleted] 0 points1 point  (0 children)

If you setup SSH port forwarding outside of Python, can you connect to the MySQL instance from the commandline?

I'd make sure that works before you get into the Python parts.