时间:2021-07-01 10:21:17 帮助过:3人阅读
3)具体操作步骤
3.1)停止3308 环境 slave模式 并 开启 master
停止slave
mysql> stop slave;
配置3308为主机模式
mysql> GRANT REPLICATION SLAVE ON *.* to ‘mycat_sync_3308‘@‘%‘ identified by ‘mycat_sync_3308‘;
Query OK, 0 rows affected (0.00 sec)
mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000005 | 284 | | |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)
3.2)3306 环境开启slave
3.3)原master机切换为slave模式
3.4)数据验证
3.5)mycat 验证
《Mycat学习笔记》 第三篇. MySql 主从同步异常后,主从切换
标签: