设为首页 加入收藏

TOP

MySQL 5.6 create table like 同步异常问题分析与总结(二)
2017-02-28 08:15:52 】 浏览:443
Tags:MySQL 5.6 create table like 同步 异常 问题 分析 总结
in set (0.00 sec)


?test@21:03:54> use linuxidc;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A


?Database changed
linuxidc@21:03:56> show tables;
+------------------+
| Tables_in_linuxidc |
+------------------+
| t_check_sync? ? |
| linuxidc_a? ? ? ? |
| linuxidc_b? ? ? ? |
| linuxidc_c? ? ? ? |
| linuxidc_d? ? ? ? |
+------------------+
5 rows in set (0.00 sec)


?linuxidc@21:04:26>


再看从库上实际创建的表的情况,linuxidc库中有两张,test库没有:
linuxidc@20:38:26> show tables;
+------------------+
| Tables_in_linuxidc |
+------------------+
| t_check_sync? ? |
| linuxidc_a? ? ? ? |
| linuxidc_c? ? ? ? |
+------------------+
3 rows in set (0.00 sec)


?linuxidc@20:40:55> use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A


?Database changed
test@20:40:58> show tables;
+----------------+
| Tables_in_test |
+----------------+
| tmp_1126? ? ? |
+----------------+
1 row in set (0.00 sec)


?test@20:41:00>


在从库上查看relay-log,说明在主库上创建8张对照表的binlog已经同步过来了,只不过slave在reply的时候过滤掉了,日志内容如下:
[root@localhost logs]# /usr/local/mysql/bin/mysqlbinlog -vv --start-datetime='2016-10-27 20:39:55' --stop-datetime='2016-10-27 20:39:56' relay_log.003689 > /tmp/test.sql
[root@localhost logs]# grep 'test_[a-z]\|linuxidc_[a-z]' /tmp/test.sql
create table test.test_a like linuxidc.t_check_sync
create table linuxidc.linuxidc_a like linuxidc.t_check_sync
create table test.test_b like test.t_store
create table linuxidc.linuxidc_b like test.t_store
create table test.test_c like linuxidc.t_check_sync
create table linuxidc.linuxidc_c like linuxidc.t_check_sync
create table test.test_d like test.t_store
create table linuxidc.linuxidc_d like test.t_store
[root@localhost logs]#


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇MySQL主从复制常见错误及解决方法 下一篇MySQL同步报错故障处理及同步不一..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目