title: mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
body: <p>I am following along with lecturer's code and videos.  He has this set up, and I have followed exactly.  His works, mine doesn't and I cant figure out why.  It is set up as user &quot;root&quot; and password is blank.  I have tried pip install mysql-connector-python.  I want to keep the same user and password as his so as to follow along better.  I am using  python and mysql via Wampserver64.  When I try to run the python file through cmd I get the error &quot;mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)&quot;.  I am new to this so trying to figure it out as I go along.  Does the (using password: YES) mean that the passwords match?  And how to I get script to connect to mysql?</p>
  <pre><code>
  
  db = mysql.connector.connect(
      host = &quot;localhost&quot;,
      user= &quot;root&quot;,
      password = &quot; &quot;
      #database ='datarepresentation'
  )
          #print (&quot;connection made&quot;)
  
  cursor = db.cursor()
  
  cursor.execute(&quot;CREATE DATABASE datarepresentation&quot;)
  </code></pre>