This might be a simple one, but I couldn't figure it out. I couldn't connect to the database that I created 'clearview' in mysql through.
Please advise. Thanks!
NameError                                 Traceback (most recent call last)
 in 
      3 try:
----> 4     connection = mysql.connector.connect(host='localhost',
      5                                          database='clearview',
NameError: name 'mysql' is not defined
All comments & suggestions appreciated. I did everything suggested here. And yes, I basically have to install the mysql.connector to every environment I created to be sure. I think perhaps, that's why it indicated that mysql is not defined. Lesson learned>..
As follow up question... is there such thing as installing every Python extensions globally so I would not reinstall it in several environments. never tried it before, as I perhaps tinkering with different environments not knowing which one I'm currently using. :)
Thanks guys!!!
how to connect using python to mysql server