title: ERROR 1044 (42000): Access denied for user
body: <p>I created a new user with a password in MySQL. </p>
  
  <pre><code>mysql&gt; GRANT ALL PRIVILEGES ON simple_cms_development.*
      -&gt; TO 'simple_cms'@'localhost'
      -&gt; IDENTIFIED BY 'xxxxxxx';
  Query OK, 0 rows affected (0.04 sec)
  </code></pre>
  
  <p>I checked that it was created:</p>
  
  <pre><code>mysql&gt; SHOW GRANTS FOR 'simple_cms'@'localhost';
  +-------------------------------------------------------------------------------------------------------------------+
  | Grants for simple_cms@localhost                                                                                   |
  +-------------------------------------------------------------------------------------------------------------------+
  | GRANT USAGE ON *.* TO 'simple_cms'@'localhost' IDENTIFIED BY PASSWORD '*CA931C969BFB20B345B153F9AE0B3EBC543B48EF' |
  | GRANT ALL PRIVILEGES ON `simple_cms_development`.* TO 'simple_cms'@'localhost'                                    |
  +-------------------------------------------------------------------------------------------------------------------+
  2 rows in set (0.00 sec)
  </code></pre>
  
  <p>I attempted to sign in as that user and received a 1044 error: </p>
  
  <pre><code> Macintosh-2:simple_cms kmcrayton7$ mysql -u simple_cms -p simple_csm_development;
      Enter password: 
      ERROR 1044 (42000): Access denied for user 'simple_cms'@'localhost' to database 'simple_csm_development'
  </code></pre>
  
  <p>Followed the steps in answer <a href="https://stackoverflow.com/questions/489119/mysql-error-1045-access-denied">#1 and #6</a> and here is the result: </p>
  
  <pre><code>mysql&gt; select user,host,password from mysql.user;
  +------------+-----------+-------------------------------------------+
  | user       | host      | password                                  |
  +------------+-----------+-------------------------------------------+
  | root       | localhost | *986BD1453A6B2F3CCF85DC695B981EE516B7613D |
  | root       | macintosh | *986BD1453A6B2F3CCF85DC695B981EE516B7613D |
  | root       | 127.0.0.1 | *986BD1453A6B2F3CCF85DC695B981EE516B7613D |
  | root       | ::1       | *986BD1453A6B2F3CCF85DC695B981EE516B7613D |
  |            | localhost |                                           |
  |            | macintosh |                                           |
  | simple_csm | localhost | *CA931C969BFB20B345B153F9AE0B3EBC543B48EF |
  | simple_cms | localhost | *CA931C969BFB20B345B153F9AE0B3EBC543B48EF |
  +------------+-----------+-------------------------------------------+
  8 rows in set (0.04 sec)
  
  mysql&gt; exit
  Bye
  Macintosh-2:simple_cms kmcrayton7$ mysql -u simple_cms -p simple_csm_development;
  Enter password: 
  ERROR 1044 (42000): Access denied for user 'simple_cms'@'localhost' to database 'simple_csm_development'
  
  
    [1]: https://stackoverflow.com/questions/489119/mysql-error-1045-access-denied
  </code></pre>
  
  <p>I don't know where I'm making my mistake</p>
  
  <p>I was attempting to following the suggestion below but now I can't seem to gain access at all:</p>
  
  <pre><code>Macintosh-2:simple_cms kmcrayton7$ mysql -u root -p
  Enter password: 
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  Macintosh-2:simple_cms kmcrayton7$ mysql -u root -p
  Enter password: 
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  Macintosh-2:simple_cms kmcrayton7$ mysql -u root 
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  Macintosh-2:simple_cms kmcrayton7$ mysql -u root 
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  Macintosh-2:simple_cms kmcrayton7$ mysql -u root 
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  Macintosh-2:simple_cms kmcrayton7$ mysql -u root -p
  Enter password: 
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  Macintosh-2:simple_cms kmcrayton7$ mysql -u root -p
  Enter password: 
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
  Macintosh-2:simple_cms kmcrayton7$ 
  </code></pre>