Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configure the self-built MySQL on ECS as a pit stepped on by RDS from the library

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment:

RDS version: Ali Yun's 5.6

ECS self-built MySQL5.6.34 (official version)

By downloading the automatic full backup of Aliyun rds to ECS, follow the official steps to decompress-- > aploy-log-> mv to mysql's datadir and start mysql.

And then execute

Reset slave all

Reset master

Change master to master_host='rm-xxxxxxxxx.mysql.rds.aliyuncs.com'

Master_user='rpl'

Master_password='123456'

MASTER_PORT=3306

MASTER_AUTO_POSITION=1

This is the wrong report. Error log prompt:

2017-06-05 16:35:19 16759 [ERROR] Error reading relay log configuration.

2017-06-05 16:37:00 16759 [ERROR] Error reading master configuration.

Reason:

Aliyun's RDS is a modified version, which is different from the official table structure. (so far, there are slave_master_info, slave_relay_log_info and slave_worker_info under the mysql library, but other tables have not been carefully followed.)

In the three tables recovered by RDS, there is an extra Channel_name field than the official version. Caused our change master to fail.

The following figure shows the table structure I looked at on the compiled alisql:

Solution:

Use mysql

Drop table slave_master_info

Drop table slave_relay_log_info

Drop table slave_worker_info

Then recreate the three tables with reference to other MySQL5.6 machines.

When you are finished, follow the steps of building a slave database for GTID replication:

Change master to master_host='rm-xxxxxxxxxxx.mysql.rds.aliyuncs.com'

Master_user='rpl'

Master_password='rpl'

MASTER_PORT=3306

MASTER_AUTO_POSITION=1

SET GLOBAL gtid_purged='b9f0343a-3ac4-11e7-9769-008cfaf59624:1-6751, d50b0441-3ac4-11e7-976a-7cd30ac47780:1-106693'

Start salve

This allows you to automatically start synchronizing data.

(you don't need these steps if you compile and install alisql, because both ALiSQL and RDS open source by Aliyun have Channel_name fields.)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report