Using tommasoturchi's mysqldb connector, I'm doing this:
import mysqldb db = mysqldb.connect(host="my.host.com", user="user", passwd="pass", db="MyDBName", port=3306) cursor = db.cursor()
and I'm getting an error:
ord() expected string of length 1, but int foundall the way down in the
self._packet_number = ord(packet)
wassup with that?!
I think the port should be a string.
Actually it didn't just hang, it would eventually raise this error: ImportError: No localization support for language 'eng'.
It's probably a connection issue - but mysqldb doesn't raises the correct exception because he is looking for some file somewhere. Anyone have any clue?
It worked with the files moved to: \Modules & Templates\site-packages-3
Thank you guys!
This app together with the service provided by PythonAnywhere are so amazing! They changed my life for the better :)
Edit: Actually with the files moved to site-packages-3 - I get an error in connection.py. So I think mysqldb doesn't support python 3.
So I moved the files to site-packages-2 - and I tried running the script with python 2.7 - but the script just hangs with these two lines:
db = mysqldb.connect(host= "mysql.my_domain.co.uk", user = "my_username", passwd="my_password", db="my_database", port = 3306)