title: a timeout error when connecting to mysql database(updated)
body: <p>I want to create a python program that uses a mysql database. For that I've tried to create a connection to my mysql database using the python IDLE with this line of code:</p>
  
  <pre><code>import mysql.connector
  db = mysql.connector.connect(user="root", database="sys", host="127.0.0.0")
  </code></pre>
  
  <p>Every time I enter this code into the IDLE, it returns this message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/mysql/connector/network.py", line 509, in open_connection
      self.sock.connect(sockaddr)
  TimeoutError: [Errno 60] Operation timed out
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "&lt;pyshell#1&gt;", line 1, in &lt;module&gt;
      db = mysql.connector.connect(user="root", database="sys", host="127.0.0.0")
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/mysql/connector/__init__.py", line 179, in connect
      return MySQLConnection(*args, **kwargs)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/mysql/connector/connection.py", line 95, in __init__
      self.connect(**kwargs)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/mysql/connector/abstracts.py", line 716, in connect
      self._open_connection()
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/mysql/connector/connection.py", line 206, in _open_connection
      self._socket.open_connection()
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/mysql/connector/network.py", line 511, in open_connection
      raise errors.InterfaceError(
  mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on '127.0.0.0:3306' (60 Operation timed out)
  </code></pre>
  
  <p>I work with the python 3.8 IDLE in this situation.</p>
  
  <p>The same thing happens when I try it in the terminal, also running python 3.8.
  <em>update</em></p>
  
  <p>I tried to solve the problem by creating a new user of the database, with an actual password. I also made sure the new user has gotten all privileges. </p>
  
  <p>And then this happens in the terminal:</p>
  
  <pre><code>&gt;&gt;&gt; import mysql.connector
  &gt;&gt;&gt; a = mysql.connector.connect(user="hassan", password="**********",        database="sys", host="127.0.0.1")
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File   "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-  packages/mysql/connector/__init__.py", line 179, in connect
      return MySQLConnection(*args, **kwargs)
    File   "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-  packages/mysql/connector/connection.py", line 95, in __init__
      self.connect(**kwargs)
    File   "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-  packages/mysql/connector/abstracts.py", line 716, in connect
      self._open_connection()
    File   "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-  packages/mysql/connector/connection.py", line 208, in _open_connection
      self._do_auth(self._user, self._password,
    File    "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-  packages/mysql/connector/connection.py", line 137, in _do_auth
      packet = self._protocol.make_auth(
     File  "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site- packages/mysql/connector/protocol.py", line 99, in make_auth
      packet += self._auth_response(client_flags, username, password,
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site- packages/mysql/connector/protocol.py", line 58, in _auth_response
      auth = get_auth_plugin(auth_plugin)(
    File  "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site- packages/mysql/connector/authentication.py", line 190, in get_auth_plugin
      raise errors.NotSupportedError(
  mysql.connector.errors.NotSupportedError: Authentication plugin     'caching_sha2_password' is not supported
  </code></pre>
  
  <p>Does somebody have an explanation for this?</p>