title: Using MySQL with PYTHON - problem with MySQL Connector
body: <p>I have Python version 2.7 and downloaded MySQL version 8.0.13. 
  When I try to install the correct connector from the <a href="https://dev.mysql.com/downloads/file/?id=480222" rel="nofollow noreferrer">link</a> run it and run the following code:</p>
  
  <pre><code>import mysql.connector
  
  mydb = mysql.connector.connect(
    host="localhost",
    user="root",
    passwd="Pass"
  )
  
  print(mydb)
  </code></pre>
  
  <p>The module is not recognized:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\carmel.han\Desktop\mysqltest.py", line 1, in &lt;module&gt;
      import mysql.connector
  ImportError: No module named mysql.connector
  </code></pre>
  
  <p>When I install the SQL Connector using pip and run the same code I get:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\carmel.han\Desktop\mysqltest.py", line 7, in &lt;module&gt;
      auth_plugin='mysql_native_password'
    File "C:\Python27\ArcGIS10.4\lib\site-packages\mysql\connector\__init__.py", line 179, in connect
      return MySQLConnection(*args, **kwargs)
    File "C:\Python27\ArcGIS10.4\lib\site-packages\mysql\connector\connection.py", line 95, in __init__
      self.connect(**kwargs)
    File "C:\Python27\ArcGIS10.4\lib\site-packages\mysql\connector\abstracts.py", line 719, in connect
      self._open_connection()
    File "C:\Python27\ArcGIS10.4\lib\site-packages\mysql\connector\connection.py", line 210, in _open_connection
      self._ssl)
    File "C:\Python27\ArcGIS10.4\lib\site-packages\mysql\connector\connection.py", line 144, in _do_auth
      self._auth_switch_request(username, password)
    File "C:\Python27\ArcGIS10.4\lib\site-packages\mysql\connector\connection.py", line 167, in _auth_switch_request
      auth = get_auth_plugin(new_auth_plugin)(
    File "C:\Python27\ArcGIS10.4\lib\site-packages\mysql\connector\authentication.py", line 191, in get_auth_plugin
      "Authentication plugin '{0}' is not supported".format(plugin_name))
  NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported
  </code></pre>
  
  <p>I upgraded from pip 7.0.1 to pip 18.1, uninstalled and reinstulled the SQL-connector, same resulet.Even When I insert this line:</p>
  
  <pre><code>auth_plugin='mysql_native_password'
  </code></pre>
  
  <p>Based on this post <a href="https://stackoverflow.com/questions/50557234/authentication-plugin-caching-sha2-password-is-not-supported?rq=1">here.</a></p>
  
  <p>So I supose it might be a problem with the SQL connector version. I searched and found out you can install a specific version of the SQL - connector but I don't know which version I need.</p>
  
  <p><code>pip</code> installed <code>2.1.6</code> by default I also tried <code>2.1.4</code>, which did not work. I'm working on <em>Windows 10 64 bit</em>.</p>
  
  <p>Anybody have an Idea?</p>