Can't login to a new mysql user
- by mostar
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