Connect to MySQL on remote server from inside python script (DB API)
Posted
by
Atul Kakrana
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Atul Kakrana
Published on 2012-03-23T20:28:49Z
Indexed on
2012/03/23
23:39 UTC
Read the original article
Hit count: 303
Very recently I have started to write python scripts that need to connect few databases on mySQL server. The problem is that when I work from office my script works fine but running a script from my home while on office VPN generates connection error.
I also noticed the mySQL client Squirrel also cannot connect from my home but works fine on Office computer. I think both are giving problem for the same reason.
Do I need to create a ssh tunnel and forward the port? If yes how do I do it? mySQL is installed on server I have ssh access.
Please help me on this
AK
© Ask Ubuntu or respective owner