I would like to use MySQL through web.py module and found this code to do this:
db = web.database(dbn = 'mysql', db = 'Ulysses6$default', user = 'Ulysses6', pw = 'NotRealPw')
db.query(some_query)
The thing is, no matter what the query is, code gets stuck on it and raises OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"). I'm sorry to ask if this is stupid question because I'm begginer to python web programming, but I didn't find any useful information on google and the advised steps to deal with this either dont apply (I dont run server on localhost, I'm sure pythonanywhere doesn't have blocked ports for MySQL or that I would be able to open them, etc) or are more complex and I dont want to screw up my settings.
I think I could work around this by using python sqlite3 module, but thats not really what I want to do. Any help is appreciated