Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
mysql> GRANT REPLICATION SLAVE,FILE ON *.*
    -> TO 'repl'@'localhost' IDENTIFIED BY 'password123';

mysql -u repl -p'password123'

Access denied for user 'repl'@'localhost' (using password: YES)

Is a mysql user with replication privilege only, not allowed to login?

I've tried resetting the password, I get the same result.

share|improve this question
    
Did you execute the flush privileges command on mysql prompt after granting the permissions? –  Khaled Jan 30 '11 at 8:58
    
Yes, actually, I'm already running replication using that user. –  gAMBOOKa Jan 30 '11 at 9:00
1  
The replication user should be allowed to login as any other user. I can notice that repl is created on localhost. Usually, you should create it on other_ip_host. Is this for testing only? –  Khaled Jan 30 '11 at 9:18
    
You're right Khaled, that was it. Sorry for the misinformation. I was trying to simplify things. –  gAMBOOKa Jan 30 '11 at 10:13

1 Answer 1

up vote 0 down vote accepted

As Khaled mentioned in the comments, replication users are generally created on the remote server. I was creating it like this, the question is incorrect:

GRANT REPLICATION SLAVE,FILE ON *.*
-> TO 'repl'@'remoteip' IDENTIFIED BY 'password123';

So if you have issues logging in as a replication user, make sure you're logging in from the remote server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.