title: Mysql database not connecting to python
body: <p>I am trying to connect python to mysql by this code--
  (I am using the mysql.connect library)</p>
  
  <pre><code>import mysql.connector
  
  cnx = mysql.connector.connect(user='root', 
                            password='password',
                            host='127.0.0.1',
                            database='db')
  print(cnx)
  cnx.close()
  </code></pre>
  
  <p>But it continues to throw the error--</p>
  
  <pre><code>Traceback (most recent call last):
  File "D:/ted/main.py", line 5, in &lt;module&gt;
  database='db')
  File "C:\Program Files (x86)\Python36-32\lib\mysql\connector\__init__.py", 
  line 179, in connect
  return MySQLConnection(*args, **kwargs)
  File "C:\Program Files (x86)\Python36-32\lib\mysql\connector\connection.py", 
  line 94, in __init__
  self.connect(**kwargs)
  File "C:\Program Files (x86)\Python36-32\lib\mysql\connector\abstracts.py", 
  line 722, in connect
  self._open_connection()
  File "C:\Program Files (x86)\Python36-32\lib\mysql\connector\connection.py", 
  line 211, in _open_connection
  self._ssl)
  File "C:\Program Files (x86)\Python36-32\lib\mysql\connector\connection.py", 
   line 141, in _do_auth
  auth_plugin=self._auth_plugin)
  File "C:\Program Files (x86)\Python36-32\lib\mysql\connector\protocol.py", 
  line 102, in make_auth
  auth_data, ssl_enabled)
  File "C:\Program Files (x86)\Python36-32\lib\mysql\connector\protocol.py", 
  line 58, in _auth_response
  auth = get_auth_plugin(auth_plugin)(
   File "C:\Program Files (x86)\Python36- 
  32\lib\mysql\connector\authentication.py", line 191, in get_auth_plugin
  "Authentication plugin '{0}' is not supported".format(plugin_name))
  mysql.connector.errors.NotSupportedError: Authentication plugin 
  'caching_sha2_password' is not supported
  
  Process finished with exit code 1
  </code></pre>
  
  <p>I have started the mysql sever in workbench and the also checked the status.
  Also database named "db" is also there
  Also checked if the host is proper.
  -->Removed ssl also.</p>