title: MySQL: Access denied for user 'test'@'localhost' (using password: YES) except root user
body: <p>I am facing problem with mysql non root/admin user, I am following the below steps for creating user and its privileges, correct me if i am doing wrong,</p>
  
  <p>i am installing <code>mysql</code> on <code>RHEL 5.7 64bit</code>, packages are mentioned below, once i done the <code>rpm install</code> we are </p>
  
  <ol>
  <li>creating mysql db using <code>mysql_install_db</code>, then </li>
  <li>starting the mysql service then </li>
  <li>using <code>mysql_upgrade</code> also we are doing to the server.</li>
  </ol>
  
  <p>After this process i can login as <code>root</code> but with a non-root user I am not able to log into the server:</p>
  
  <pre><code>[root@clustertest3 ~]# rpm -qa | grep MySQL
  MySQL-client-advanced-5.5.21-1.rhel5
  MySQL-server-advanced-5.5.21-1.rhel5
  
  
  [root@clustertest3 ~]# cat /etc/my.cnf
  [mysqld]
  datadir=/var/lib/mysql
  socket=/var/lib/mysql/mysql.sock
  user=mysql
  # Default to using old password format for compatibility with mysql 3.x
  # clients (those using the mysqlclient10 compatibility package).
  old_passwords=1
  
  # Disabling symbolic-links is recommended to prevent assorted security risks;
  # to do so, uncomment this line:
  # symbolic-links=0
  
  [mysqld_safe]
  log-error=/var/log/mysqld.log
  pid-file=/var/run/mysqld/mysqld.pid
  
  [root@clustertest3 ~]# ls -ld /var/lib/mysql/mysql.sock
  srwxrwxrwx 1 mysql mysql 0 Nov  30 11:09 /var/lib/mysql/mysql.sock
  
  mysql&gt; CREATE USER 'golden'@'%' IDENTIFIED BY 'password';
  Query OK, 0 rows affected (0.00 sec)
  
  mysql&gt; GRANT ALL PRIVILEGES ON * . * TO 'golden'@'%';
  Query OK, 0 rows affected (0.00 sec)
  
  mysql&gt; FLUSH PRIVILEGES;
  Query OK, 0 rows affected (0.00 sec)
  
  mysql&gt; SELECT USER(),CURRENT_USER();
  +----------------+----------------+
  | USER()         | CURRENT_USER() |
  +----------------+----------------+
  | root@localhost | root@localhost |
  +----------------+----------------+
  1 row in set (0.00 sec)
  
  [root@clustertest3 ~]# mysql -ugolden -p
  Enter password:
  ERROR 1045 (28000): Access denied for user 'golden'@'localhost' (using password: YES)
  </code></pre>
  
  <p>This is the problem I am facing, is there any solution to this?</p>