Connect to Database via proxy a python script
Question: 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.cursor()
    


Answer: I think setting the port on the connect command would work.

    
    
    conn = mdb.connect(host='slkds.com', port='9000', user='user', passwd='wd', db='my')
    

or you can set a system proxy for what ever you are running on and then the
scrip will work

