MySQL Forums
Forum List  »  MySQL Administrator

MYSQL USER ACCESS ISSUE
Posted by: Varun Datta
Date: November 27, 2012 06:38AM

Hi,

I have installed MySQL Server 5.5.28 on RHEL 5.5 machine.

I created a mysql database prash , user prash and granted prvileges as mentioned below:-

create database prash;

create user 'prash'@'localhost' identified by 'prash';
create user 'prash'@'%' identified by 'prash';
Grant ALL ON prash.* to 'prash'@'%' WITH GRANT OPTION;
GRANT FILE ON *.* to 'prash'@'%' WITH GRANT OPTION;
GRANT SHOW DATABASES ON *.* to 'prash'@'%' WITH GRANT OPTION;
Grant ALL ON prash.* to 'prash'@'localhost' WITH GRANT OPTION;
GRANT FILE ON *.* to 'prash'@'localhost' WITH GRANT OPTION;
GRANT SHOW DATABASES ON *.* to 'prash'@'localhost' WITH GRANT OPTION;
flush privileges;



Now i can login as prash user from any other machine. But on the database machine iam facing behaviour as mentioned below:-

$ mysql -uprash -pprash
--login is successfull

$ mysql -uprash -pprash -hvmlnx3
ERROR:ERROR 1045 (28000): Access denied for user 'prash'@'vmlnx3' (using password: YES)

vmlnx3 -MYSQL Database machine hostname

Not sure why i cannot login using above command as i already created prash@% user as well as prash@localhost user.
I do not want to create another user prash@vmlnx3 as i feel it is not required.

Output of mysql.user table :-
+-------------+------------+-------------------------------------------+
| host | user | password |
+-------------+------------+-------------------------------------------+
| localhost | | |
| vmlnx3 | | |
| % | prash | *9B500343BC52E2911172EB52AE5CF4847604C6E5 |
| localhost | prash | *70FBD2CC61D069A957FB133976C79A26FD14A9C6 |
| 10.32.5.209 | replicator | *D36660B5249B066D7AC5A1A14CECB71D36944CBC |
| localhost | replicator | *D36660B5249B066D7AC5A1A14CECB71D36944CBC |
| vmlnx4 | replicator | *D36660B5249B066D7AC5A1A14CECB71D36944CBC |
| % | root | *F861720E101148897B0F5239DB926E756B1C28B3 |
| 127.0.0.1 | root | |
| ::1 | root | |
| localhost | root | *F861720E101148897B0F5239DB926E756B1C28B3 |
| vmlnx3 | root | *F861720E101148897B0F5239DB926E756B1C28B3 |
+-------------+------------+-------------------------------------------+

Please assist in solving this issue.

Thanks,
Varun Datta

Options: ReplyQuote


Subject
Written By
Posted
MYSQL USER ACCESS ISSUE
November 27, 2012 06:38AM
November 27, 2012 01:14PM
November 28, 2012 06:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.