0

I am building two mysql machines in master-slave config. Master has:

mysql> create user 'repl'@'%.%.%.abc.mydomain.com' identified by 'mypassword';
mysql> grant replication slave on *.* to 'repl'@'%.%.%.abc.mydomian.com';

So basically anything like my.sql.slave.abc.mydomian.com should be able to connect but on slave if I try:

shell> mysql -h my.sql.master.abc.mydomain.com -urepl -pmypassword

it says:

ERROR 1130 (HY000): Host '10.10.2.231' is not allowed to connect to this MySQL server

I think this is happening because %.%.%.abc.mydomian.com is allowed to connect and not 10.10.2.231. I do not want to use IP for connection. How do I make sure that I am able to connect from my.sql.slave.abc.mydomian.com without putting IPs into picture.

I don't know if this info is required or not but dns lookup and reverse dns lookup is working fine for both master and slave.

Aditya Patawari
  • 1,065
  • 10
  • 23

1 Answers1

3

Make sure you don't have skip_name_resolve set in your my.cnf or in your startup options. http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_skip-name-resolve

slillibri
  • 1,643
  • 1
  • 9
  • 8