MySQL in pythonista
Hey there guys ... I'm a noob on both Python and pythonista. Is there a step by step I can follow that will allow me to connect to MySQL external data from my scripts in pythonista? I've installed pipista and stash but I can't seem to find or install a workable solution.
I got it working ! Thanks for your help chriswilson !
Is there an easier way to import the scripts from GitHub - or did you just create new files and copy - paste from safari or something?
Try the following in stash
thank you so much! I tried git pull before asking you! I need to learn to use github thats for sure :)
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)
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?
No localization support for language 'eng'.
This might be related to https://github.com/omz/Pythonista-Issues/issues/27
I tried adding:
import locale locale.setlocale(locale.LC_ALL, 'de_DE')
as they said - but I just get 'unsupported locale setting'
Thank you for the magnificent problem-solving information. Allow me to submit the following step-by-step instructions for installing MySQL access to pythonista for iOS; it worked for me.