Comments - Setting Up Replication

8 years, 1 month ago Walter Heeroma

When using replication in MariaDB, slaves identify themselves at the master, and this identification is checked against valid users with replication permissions in the master database.

In my test situation this identification frequently fails. By checking the column Last_IO_Error in the 'SHOW ALL SLAVES STATUS' output I learned that the slave switched its identification between full computer name (computer name plus domain name) and IP address. Though these switches were not very frequent (maybe once per hour), they seemed to happen completely at random. As the user was created on the master with the full computer name as hostname, this resulted in a failure whenever the slave introduced itself by its IP address.

This problem might be easily circumvented by creating a user with a wildcard, or an IP mask along the pattern xxx.xxx.%.% for a hostname. But in the context where I am working, this is not an acceptable solution.

So my question is: what is the cause of this erratic behaviour, and is there a way to force the slave to use computername plus domain as its identification?

 
8 years, 1 month ago Qiu cb

you may try add skip-name-resolve to your my.cnf, or start mysqld with the --skip-name-resolve option. this option would make mysql do not resolve host names when checking client connections (only use ip address).

 
8 years, 1 month ago Walter Heeroma

But I want it the other way round! I have to use the full computer name for identification, IP-addresses are not allowed (and not practical as they may change). So skip-name-resolve would not help me.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.