Mysql – ERROR 1130 (HY000): Host ‘host’ is not allowed to connect to this MySQL server, only on slave

debianmaster-slaveMySQLmysql-replicationslave

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

Best Answer

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.