Connect to Database via proxy a python script
问题 I have a python script that connects to a remote MySQL database using the python library MySQLdb. It works fine but how can I get it to connect through a proxy that I'm behind when at work. I can connect via the command line in ssh, but how do I get the python script to use the proxy settings. There doesnt seem to be any options in the MySQLdb commands for proxy configurations. import MySQLdb as mdb conn=mdb.connect(host='mysite.com',user='myuser',passwd='mypassword',db='mydb') cursor = conn