Multi-channel replication is one of the great feature shipped with MySQL 5.7, With allowed the capability of slave to have many masters, having a channel for each master by which they replicate. Each channel id has a unique “ channel_name ”

Multi-Channel Replication

In the above DB Architecture “channel_1, channel_2 and channel_3” represent the channel_name used for replication from different MySQL servers ( Source ).

In this blog we are not going see about configuration of multi_source replication, rather we are going to see about rolling back multi-source replication in MySQL.

Recently we were working on a client, where we had deployed multi-channel replication replication from two master onto a single slave, sync was happening very fine

Then came the situation to break the replication from two channel and make it as normal replication strategy in default mode ie., with single master and single slave. We had faced a few issues while disabling that.

Version used : 5.7.19-17-57-log Percona server

Stopping the Multi channel replication.

mysql > stop slave for channel ‘channel_1’;

mysql > stop slave for channel ‘channel_2’;

Channels has been reset as below.

mysql > reset slave for channel ‘channel_1’;

mysql > reset slave for channel ‘channel_2’;

Reseting all available channels ( if any present in case )

mysql > reset slave;

Since reset of all the channels has been completed, We have proceed with the ‘CHANGE MASTER’ command as below for making it as normal slave without specifying any channel name.

mysql> change master to master_host='172.0.0.10',master_user='repltest',master_password='repltest',master_log_file='mysql-bin.000135',master_log_pos=1011568029;

On execution i had encountered the below error.

“ERROR 3079 (HY000): Multiple channels exist on the slave. Please provide channel name as an argument.”

Tried to dig in deeper. MySQL server is under the impression “once the replication channel is enabled ( multi source ), it always demands a channel name for any ‘CHANGE MASTER’ related commands irrespective of resetting all channels. Adding a unique ‘channel name’ at the end along with ‘CHANGE MASTER’ command allows the smooth executions but that is not the goal.

We tried the below flush information in memory through replication replication related flush commands and flush status to overcome this behaviour, but that does not helped to.

mysql> flush status;

mysql> flush logs;

mysql> flush relay logs;

The possible place where MySQL might get the channel information is the replication meta data ( master info). In MySQL 5.7 these informations are stored as tables by default inside mysql DB for crash safe and consistency. When validated we are still able to note the channel information inside the table slave_master_info . The table is truncated to empty its content.

mysql> truncate table mysql.slave_master_info;

Query OK, 0 rows affected (0.01 sec)

Once again we tried the “CHANGE MASTER” , the same error persisted,since replication metadata info is cached on to to the memory it prevented it. To clear cache we did a restart of mysql service. ‘CHANGE MASTER ‘ worked as expected and we are able to rollback the Multi-source replication successfully.

注意:本文来自Planet MySQL。本站无法对本文内容的真实性、完整性、及时性、原创性提供任何保证,请您自行验证核实并承担相关的风险与后果!

CoLaBug.com遵循[CC BY-SA 4.0]分享并保持客观立场,本站不承担此类作品侵权行为的直接责任及连带责任。您有版权、意见、投诉等问题,请通过[eMail]联系我们处理,如需商业授权请联系原作者/原网站。

multi source replication mysql,Disabling Multi-Source Replication in MySQL 5.7相关推荐

  1. mysql 5.7 group replication 之三 ERROR 3092 (HY000): The server is not configured properly to be an ac

    os: ubuntu 16.04 db: mysql 5.7.25 规划如下: 192.168.56.92 node1 # mysql 192.168.56.90 node2 # mysql 192. ...

  2. mysql 5.7 group replication 之四 [ERROR] Plugin group_replication reported: 'Member was expelled from

    os: ubuntu 16.04 db: mysql 5.7.25 规划如下: 192.168.56.92 node1 # mysql 192.168.56.90 node2 # mysql 192. ...

  3. mysql replication writing to net_最简单的MySQL replication配置过程.

    环境: 系统: CentOS6.4 主机: master: 192.168.0.100 slave: 192.168.0.101 配置文件/etc/my.cnf修改前: [mysqld] datadi ...

  4. mysql 参数sql文件_为MySQL的source命令导入SQL文件配置参数

    为MySQL的source命令导入SQL文件配置参数 执行 mysql -uroot -p 输入密码后进入 MySQL 命令提示符 set charset utf8; source /root/xxx ...

  5. MySQL学习笔记之九:MySQL Replication

    Mysql内建的复制功能是构建大型.高性能应用程序的基础.复制功能不仅有利于构建高性能的应用,同时也是高可用性.可扩展性.灾难恢复.备份以及数据仓库等工作的基础. 一.复制概述 1.复制的功用 数据分 ...

  6. mysql 执行sql error 2,Mysql:执行source sql脚本时,出现:error 2

    Centos下部署mysql: 1.yum -y install mysql*; 2.service mysqld start; 3.chkconfig mysqld on; 4.设置用户名和密码:m ...

  7. mysql source导入慢,MySQL mysqldump与source导入慢怎么解决

    摘要 腾兴网为您分享:MySQL mysqldump与source导入慢怎么解决,智慧城管,掌上书院,杂志迷,盈益云等软件知识,以及蚂蚁精灵,dnf深渊柱子补丁,宠物派,英语打字软件,爱原创,武装突袭 ...

  8. Mysql:执行source sql脚本时,出现:error 2

    Centos下部署mysql: 1.yum -y install mysql*; 2.service mysqld start; 3.chkconfig mysqld on; 4.设置用户名和密码:m ...

  9. Linux MySQL主主复制(Replication)(MySQL数据双向同步)配置

    http://www.centos.bz/2011/07/linux-mysql-replication-two-way-sync/#配置当前从服务器 Linux MySQL主主复制(Replicat ...

最新文章

  1. 调整命令行的列数和行数 mode con: cols=100 lines=10000
  2. spring配置文件import标签中使用${}占位符获得配置文件的属性值
  3. lucene索引合并与增量索引
  4. 还在重复造轮子?Java开发人员必知必会的20种常用类库和API
  5. 实操《深入浅出React和Redux》第二期—Flux
  6. docker随着主机启动 自动启动设置
  7. jest单元测试-基础
  8. 三、瞰景Smart3D Master主界面
  9. 关于Sentinel-2快速查询图幅号——使用MGRS_100kmSQ_ID_File_Geodatabase快速查询
  10. HTML常用标签超详细整理
  11. Linux下修复U盘坏块,快速修复U盘坏块
  12. 利用Python制作动漫人物
  13. Android Service(一) Service初识
  14. Kaggle经典项目——房价预测
  15. 感慨颇多:清华差生10年奋斗经历
  16. 关于RAID1的读写问题
  17. Change 改变事件
  18. 基于Java+SpringBoot+Vue前后端分离餐厅点餐管理系统设计和实现
  19. CSS3系列 02 元素选择器
  20. Symbian S60第三版手机最基本常见问题及解决方案

热门文章

  1. 数据不平衡问题及解决方案
  2. windows下sublime通过sftp扩展上传文件到linux服务器上
  3. JavaScript权威指南笔记
  4. CentOS 6 编译安装subversion-1.8.10+Apache2.4
  5. SMI/慧荣/SM32**主控量产通用教程,PNY U盘量产!
  6. python中的 生产者和消费者
  7. Js中Reflect对象
  8. python软件设计数据分析统计服_Python 和 R 数据分析/挖掘工具互查
  9. JavaScript字符串方法——持续补充
  10. 使用ExchangeRate-API查询免费可用的汇率数据