title: mysql.connector.errors.ProgrammingError: 1698 (28000): Access denied for user 'root'@'localhost'
body: <p>I'm a newbie in Raspberry Pi and MySQL.</p>
  
  <p>I've created a code, database in phpmyadmin which ran by wamp server in my PC. Meanwhile, I want to run this code in Raspberry Pi 3. Besides that, when I run the code in Raspberry Pi 3, I want the data can be save in phpmyadmin, thus, when I run localhost on my PC, the data that I enter from Raspberry Pi can be saved in the PC too.  But, when I ran it, it shows an error message like this:</p>
  
  <blockquote>
    <p>mysql.connector.errors.ProgrammingError: 1698 (28000): Access denied
    for user 'root'@'localhost'</p>
  </blockquote>
  
  <p>Here is my db:</p>
  
  <pre><code>#connect to db
  db = mysql.connector.connect(host = 'localhost', user = 'root', password = 
  '', database = 'user')
  </code></pre>
  
  <p>Anyone know how to solve this problem?</p>