简体   繁体   中英

MariaDB Slave Error - String is too long for MASTER_HOST

I'm attempting to replicate an AWS RDS instance with MariaDB. For those not familiar, RDS instances have extremely long DNS hostnames and cannot be accessed by their underlying IP address.

When it comes time to issue the "change master" command, I receive the following error:

String 'my rds dns name' is too long for MASTER_HOST (should be no longer than 60)

I can't figure out how to bypass this. Any ideas?

For the record, I have successfully done this before with non RDS machines. I'm not a complete noob :)

Create a DNS CNAME record in one of your domains, with the long fqdn of the RDS instance as its target.

Then, reference the RDS in your replication config by the new, shorter hostname.

This is actually a good idea for another reason -- if you ever change the RDS instance where your data lives, you only have to update one thing -- the cname entry.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM