Python connect to ssh mysql server -


i'm writing small python program locally don't have root access on server. lot of mysql queries using python mysqldb module.

the thing cant use mysqldb server, mysql server hosted locally , need ssh server , use mysql there.

is there module available can connect mysql database via ssh.

at moment can connect mysql instance using ssh credentials (ip, user, pass)

i have user/pass mysql instance , i'm pretty sure runs on 127.0.0.1/localhost.

if you're set on python, use paramiko:

https://github.com/paramiko/paramiko

this seems 1 of used python ssh libraries. there other stackoverflow questions address how this.

the main idea create tunnel paramiko , connect localhost port through tunneling traffic remote server using python library mysqldb.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -