title: ERROR 1045 (28000): Access denied for user 'username'@'%' (using password: YES)
body: <p>I Installed MySQL on my CentOS 6.4 server. I logged into my root and changed its password.</p>
  
  <p>Later I thought that I should make a new user and use that user as my default user, So I created a new user name <code>golden</code> using the following command:</p>
  
  <pre><code>CREATE USER 'golden'@'%' IDENTIFIED BY 'password';
  </code></pre>
  
  <p>Then I applied permission to the user <code>golden</code>:</p>
  
  <pre><code>GRANT ALL PRIVILEGES ON * . * TO 'golden'@'%';
  
  FLUSH PRIVILEGES;
  </code></pre>
  
  <p>Now this user: <code>golden</code> was able to do everything. So I finally <code>Deleted the root user</code>. Now I am stuck up on granting privilege to my one another new user.</p>
  
  <p>I created another user, when I was logged in through <code>golden</code> (At this time I had already deleted the <code>root</code> user and command successfully created and the new user I am able to see it in list also)</p>
  
  <pre><code>CREATE USER 'fashion'@'%' IDENTIFIED BY 'password';
  </code></pre>
  
  <p>Then the following commands below gives me error:</p>
  
  <pre><code>GRANT ALL PRIVILEGES ON *.* TO 'fashion'@'%';
  </code></pre>
  
  <p><strong>ERROR:</strong> ERROR 1045 (28000): Access denied for user 'golden'@'%' (using password: YES)</p>
  
  <p>I also tried the following command the result is below:</p>
  
  <pre>
  mysql> SELECT USER(),CURRENT_USER();
  +------------------+----------------+
  | USER()           | CURRENT_USER() |
  +------------------+----------------+
  | golden@localhost | golden@%       |
  +------------------+----------------+
  </pre>
  
  <p>If I wont be able to give access to this user then how can I login and use the database? Kindly help.</p>
  
  <p><strong>EDIT 1: The following command gives me the following result</strong></p>
  
  <pre>
  mysql> select user, host FROM mysql.user;
  +------------+-------+
  | user       | host  |
  +------------+-------+
  | golden     | %     |
  | fashion    | %     |
  +------------+-------+
  </pre>