Can't login to a new mysql user

Posted by mostar on Server Fault See other posts from Server Fault or by mostar
Published on 2011-01-06T17:04:57Z Indexed on 2011/01/06 17:55 UTC
Read the original article Hit count: 339

Filed under:
|
|

Hi,

When I create a new Mysql user, it is impossible to login using this user and password. Only if I crate a user without a password I can login.

For example:

mysql -u root -phererootpass
 grant all privileges on mydb.* to testuser@'%' identified by '' with grant option;
 grant all privileges on mydb.* to testuser2@'%' identified by 'mypass' with grant option;
 FLUSH PRIVILEGES;
 exit;

mysql -u testuser  #<<< work fine

mysql -u testuser2 -pmypass  #<<< fail to login
ERROR 1045 (28000): Access denied for user 'testuser2'@'localhost' (using password: YES)
</code>

I'm using Mysql 5.0 on Red Hat v5

Please advice Mostar

© Server Fault or respective owner

Related posts about mysql

Related posts about redhat