title: error that returns me is `Access denied for user 'root'@'localhost' (using password: YES)`. Even when I use `mike`
body: <p>I want <a href="https://github.com/antoinecomp/bookchatbot" rel="nofollow noreferrer">a chatbot</a> to record data in a MySQL database.
  However I do not have much experience managing SQL databases with SQL.
  I have an <code>ActionBookRoom</code> class in file <a href="https://github.com/antoinecomp/bookchatbot/blob/master/actions.py" rel="nofollow noreferrer"><code>action.py</code></a> that calls a connection with SQL and would like to record the information I sent to it: <code>name_room</code>,<code>day</code>, <code>hour_start</code>,<code>duration</code> .</p>
  
  <p>I know I have to make the connection to the database with:</p>
  
  <pre><code>cnx = connector.connect(host='I_really_don_t_know_what_to_use_here', password='my_pass_that_works_on_mysqlcmd', user="root", database="the_database")
  </code></pre>
  
  <p>I already have some problems to make the connection and, therefore, I have more problems to know how to store the data.</p>
  
  <pre><code>class ActionBookRoom(Action):
      def name(self):
          return 'action_room'
  
      def run(self, dispatcher, tracker, domain):
          print("inside run")
          name_room = tracker.get_slot('name_room')
          day = tracker.get_slot('day')
          hour_start = tracker.get_slot('hour_start')
          duration = tracker.get_slot('duration')
  
          booking_answer = make_a_booking(name_room, day, hour_start, duration)
          print("passed booking")
          if booking_answer:
              booking_answer = 'The reservation has been made'
          else:
              booking_answer = 'The room is taken at this hour'
  
          response = """You want to book the {} room on {} at {} for {}. Is it correct ?""".format(name_room, day, hour_start, duration)
  
          name_room = str(name_room)
          day = str(day)
          hour_start = str(hour_start)
          duration = str(duration)
          print("before connexion")
          #SQL queries#
          cnx = connector.connect(host='I_don_t_know_what_to_use_here', password='my_mysql_cmd_password', user="root", database="the_database")
          print("after connexion")
  
          dispatch = dispatcher.utter_message(response)
          dispatch = dispatcher.utter_message(str(booking_answer))
  
          return dispatch
  </code></pre>
  
  <p>The error that returns me is <code>Access denied for user 'root'@'localhost' (using password: YES)</code>. Even when I use <code>mike</code>:</p>
  
  <pre><code>inside run
  [2019-02-22 16:52:00,822] ERROR in app: Exception on /webhook [POST]
  Traceback (most recent call last):
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\mysql\connector\connection_cext.py", line 179, in _open_connection
      self._cmysql.connect(**cnx_kwargs)
  _mysql_connector.MySQLInterfaceError: Access denied for user 'root'@'localhost' (using password: YES)
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\app.py", line 2292, in wsgi_app
      response = self.full_dispatch_request()
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request
      rv = self.handle_user_exception(e)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask_cors\extension.py", line 161, in wrapped_function
      return cors_after_request(app.make_response(f(*args, **kwargs)))
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\app.py", line 1718, in handle_user_exception
      reraise(exc_type, exc_value, tb)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\_compat.py", line 35, in reraise
      raise value
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request
      rv = self.dispatch_request()
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\app.py", line 1799, in dispatch_request
      return self.view_functions[rule.endpoint](**req.view_args)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask_cors\decorator.py", line 128, in wrapped_function
      resp = make_response(f(*args, **kwargs))
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\rasa_core_sdk\endpoint.py", line 86, in webhook
      response = executor.run(action_call)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\rasa_core_sdk\executor.py", line 177, in run
      events = action(dispatcher, tracker, domain)
    File "C:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\actions.py", line 42, in run
      booking_answer = make_a_booking(name_room, day, hour_start, duration)
    File "C:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\booking.py", line 61, in make_a_booking
      cnx = mysql.connector.connect(password='jeb41jeb', user="root", database="alex")
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\mysql\connector\__init__.py", line 172, in connect
      return CMySQLConnection(*args, **kwargs)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\mysql\connector\connection_cext.py", line 78, in __init__
      self.connect(**kwargs)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\mysql\connector\abstracts.py", line 735, in connect
      self._open_connection()
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\mysql\connector\connection_cext.py", line 182, in _open_connection
      sqlstate=exc.sqlstate)
  mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  2019-02-22 16:52:00 ERROR    flask.app  - Exception on /webhook [POST]
  Traceback (most recent call last):
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\mysql\connector\connection_cext.py", line 179, in _open_connection
      self._cmysql.connect(**cnx_kwargs)
  _mysql_connector.MySQLInterfaceError: Access denied for user 'root'@'localhost' (using password: YES)
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\app.py", line 2292, in wsgi_app
      response = self.full_dispatch_request()
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request
      rv = self.handle_user_exception(e)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask_cors\extension.py", line 161, in wrapped_function
      return cors_after_request(app.make_response(f(*args, **kwargs)))
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\app.py", line 1718, in handle_user_exception
      reraise(exc_type, exc_value, tb)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\_compat.py", line 35, in reraise
      raise value
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request
      rv = self.dispatch_request()
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask\app.py", line 1799, in dispatch_request
      return self.view_functions[rule.endpoint](**req.view_args)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\flask_cors\decorator.py", line 128, in wrapped_function
      resp = make_response(f(*args, **kwargs))
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\rasa_core_sdk\endpoint.py", line 86, in webhook
      response = executor.run(action_call)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\rasa_core_sdk\executor.py", line 177, in run
      events = action(dispatcher, tracker, domain)
    File "C:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\actions.py", line 42, in run
      booking_answer = make_a_booking(name_room, day, hour_start, duration)
    File "C:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\booking.py", line 61, in make_a_booking
      cnx = mysql.connector.connect(password='jeb41jeb', user="root", database="alex")
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\mysql\connector\__init__.py", line 172, in connect
      return CMySQLConnection(*args, **kwargs)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\mysql\connector\connection_cext.py", line 78, in __init__
      self.connect(**kwargs)
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\mysql\connector\abstracts.py", line 735, in connect
      self._open_connection()
    File "c:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack\staenv\lib\site-packages\mysql\connector\connection_cext.py", line 182, in _open_connection
      sqlstate=exc.sqlstate)
  mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  </code></pre>
  
  <p>I use <code>MySQLWorbench</code> but I'm still a newbie. I get access to MySQL 8.0 CLI with, say, <code>my_password</code>, get the users:</p>
  
  <pre><code>mysql&gt; SELECT User FROM mysql.user;
  +------------------+
  | User             |
  +------------------+
  | mike             |
  | mysql.infoschema |
  | mysql.session    |
  | mysql.sys        |
  | root             |
  +------------------+
  5 rows in set (0.00 sec)
  </code></pre>
  
  <p>I have <code>Access denied for user 'root' @ 'localhost' (using password: YES)</code> even when I provide the password that worked or <code>mike</code></p>
  
  <p>Should I reinstall MySQL ?</p>
  
  <h1>Update :</h1>
  
  <p>I reinstalled MySQL and tried it with the CLI and it works:</p>
  
  <pre><code>(staenv) C:\Users\antoi\Documents\Programming\Nathalie\18_2_2019\starter-pack-rasa-stack&gt;python
  Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 13:35:33) [MSC v.1900 64 bit (AMD64)] on win32
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import mysql.connector
  &gt;&gt;&gt; db = mysql.connector.connect(
  ...     host="localhost",user="root",password="MySQL.2019",database="alex")
  &gt;&gt;&gt;
  &gt;&gt;&gt; cursor = db.cursor()
  &gt;&gt;&gt; cursor.execute("SELECT * FROM reservations")
  &gt;&gt;&gt; myresult = cursor.fetchall()
  &gt;&gt;&gt; for x in myresult:
  ...   print(x)
  ...
  (1, 'red', datetime.datetime(2018, 8, 8, 12, 0), None)
  (2, 'red', datetime.datetime(2018, 8, 8, 12, 0), None)
  &gt;&gt;&gt;
  </code></pre>
  
  <p>But I still have the error when I try to do it from the file <a href="https://github.com/antoinecomp/bookchatbot/blob/master/actions.py" rel="nofollow noreferrer">actions.py</a></p>