Unfortunately, I am still stuck even after the mighty Pretty Printed example. :(
Here is my sample code:
sshtunnel.SSH_TIMEOUT = 5.0
sshtunnel.TUNNEL_TIMEOUT = 5.0
tunnel = sshtunnel.SSHTunnelForwarder(
('ssh.pythonanywhere.com'), ssh_username='MYNAME', ssh_password='MYPASS',
remote_bind_address=(MYNAME.mysql.pythonanywhere-services.com', 3306)
)
tunnel.start()
SQLALCHEMY_DATABASE_URI = 'mysql+mysqlconnector://MYNAME:MYDBPASS@127.0.0.1:{}/MYNAME$DBNAME'.format(tunnel.local_bind_port)
When I start the server and try to run db.create_all(), it hangs forever. I received an email from PA that my processes were in the tarpit. From what I can tell, it just keeps trying to make SSH connections and hangs.
I am not sure how to debug further. :( Thanks for any guidance.