Forums

Peewee connection to mysql

hello, is there a way to connect peewee from localhost to pythonanywhere mysql service? everytime i try it runs out of time and i cant find anything on the documentation at peewee docs about doing a ssh connection

You can't connect directly to a user database on PythonAnywhere because we don't expose our user databases to the internet. You can use SSH tunneling, though. There are instructions here that are focussed on tunnelling for a GUI, but they also apply to your use-case. Bear in mind that databases are generally assumed to be running quite close to their clients so the performance is probably going to be quite a lot worse than you expect.

ahhh i see!

Thanks!