from sshtunnel import SSHTunnelForwarder
with SSHTunnelForwarder(('sshhost.domain.com', 22), ssh_password=
    'sshpasswd', ssh_username='sshusername', remote_bind_address=(
    'mysqlhost.domain.com', 3306)) as server:
    pass
ssh first with mysqldb in python