0

So I have a master and a slave in a mysql cluster, the syntonization works as it should however I am not able to connect to the slave from any host except from the server it self.

I have no problems connection to the master, but now I need to spread the load of read queries to the slave and this problem appears.

I have used GRANT with % as host to ensure that it's just not a typo. But now I'm stuck and can't seem to find a solution.

Using working credentials on the master resolves in a ERROR 1103 on the slave: ERROR 1130 (HY000): Host 'host' is not allowed to connect to this MySQL server

workBook:~ gonace$ mysql --no-defaults -h10.0.5.101 -uroot -p
Enter password: 
ERROR 1130 (HY000): Host '10.0.2.13' is not allowed to connect to this MySQL server

Thanks in advance

3
  • Pasting the exact error will be helpful since you said you have already granted permission to the host.
    – Sreeraj
    Dec 9, 2014 at 12:28
  • I can't see any error in the logs but. I'll added the error thrown when I try to connect to the slave
    – gonace
    Dec 9, 2014 at 12:36
  • You can try to stop both servers and then copy the user.MYD, user.MYI and user.frm files from master to the slave. Sure you have to backup old files on the slave. Then start both servers. That is not a solution but you can login at slave at least.
    – Kondybas
    Dec 9, 2014 at 16:33

2 Answers 2

1

Try using a new user in your grant statement, you might have a user conflict in mysql user table.

grant all privileges (or any other privileges) on *.* (or any other database) to '__NEWUSER__'@'%' identified by '__PASSWORD__';

Replace NEWUSER with new user and PASSWORD with a password, here is example.

grant all privileges on *.* to 'xxx'@'%' identified by 'areallyhardpassword'; 

If you manage to connect it means that you need to fix your mysql user table, you probably have some duplicate defintions.

If that doesn't work try checking the firewall on the machine.

Hope it helps.

0

I tried to copy the user.MYD, user.MYI and user.frm as "Kondybas" answer and it worked!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .