- 论坛徽章:
- 0
|
centos 6.4
mysql 5.6.14
配置为上master,mysql1对外提供写服务,mysql2设置read-only
host:
mysql1 原master
mysql2 新master
使用MHA在线切换后master变为mysql2,开始重新设置双主。
新master端
1.FLUSH TABLES WITH READ LOCK;
salve进程此时都未启动
2.change master to master_host='mysql1',master_user='repl',master_password='slave',master_log_file='mysql-bin.000018',master_log_pos=326;
3.start slave
这里发现log_file手误输入错误,想停止slave进程,由于还处于lock状态stop失败
mysql> stop slave;
ERROR 1192 (HY000): Can't execute the given command because you have active locked tables or an active transaction
mysql> stop slave sql_thread;
ERROR 1192 (HY000): Can't execute the given command because you have active locked tables or an active transaction
此时又不能unlock,导致数据不一致,尝试在原master端kill repl进程,刚kill掉就又启动一个。
这个情况改如何处理? |
|