I\'m using Python 3.6 (but I get the same error with Python 2.7) and mysql-connector-python in an Anaconda\'s environment to code a simple script to access my database hoste
I had the exact same problem, but since I was unable to use mlcr's solution (it was an AWS RDS database) my solution was different. I had to change mysql-connector-python versions from 8.x.x to 2.2.3. That resolved my issue entirely. Hope this helps someone.