在试Mysql5.6,搭了个主从:
CHANGE MASTER TO
MASTER_HOST='1.2.3.4',
master_user='slave',
master_password='xxxqqq',
master_port=,
MASTER_LOG_FILE='binlog.000001',
MASTER_LOG_POS=;
一切正常。然后在主上建个表,在从上一看没有。再看看状态:
mysql> show slave status\G;
*************************** . row ***************************
Slave_IO_State:
Master_Host: 1.2.3.4
Master_User: slave
Master_Port:
Connect_Retry:
Master_Log_File: binlog.
Read_Master_Log_Pos:
Relay_Log_File: relaylog.
Relay_Log_Pos:
Relay_Master_Log_File: binlog.
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno:
Last_Error:
Skip_Counter:
Exec_Master_Log_Pos:
Relay_Log_Space:
Until_Condition: None
Until_Log_File:
Until_Log_Pos:
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno:
Last_IO_Error: Got fatal error from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'binlog.' at 107, the last event read from '/mnt/disk1/mysql_5615_binlog/binlog.' at 107, the last byte read from '/mnt/disk1/mysql_5615_binlog/binlog.' at 126.'
Last_SQL_Errno:
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id:
Master_UUID: aa8bc3d4-81aa-11e3--001517a25b3a
Master_Info_File: /mnt/disk1/mysql_5615/master.info
SQL_Delay:
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count:
Master_Bind:
Last_IO_Error_Timestamp: ::
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position:
row in set (0.00 sec) ERROR:
No query specified
确认了我的max_allowed_packet 是32M,太够了啊。搞了半天无果,后来搜了搜,发现了这个贴子(http://blog.chinaunix.net/uid-451-id-3087001.html),说是根本原因是偏移量不对。于是去主上看看:
mysqlbinlog binlog.
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at
# :: server id end_log_pos CRC32 0xf881fb00 Start: binlog v , server v 5.6.-debug-log created :: at startup
ROLLBACK/*!*/;
BINLOG '
KcPdUg9ZAgAAdAAAAHgAAAAAAAQANS42LjE1LWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAApw91SEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAQD7
gfg=
'/*!*/;
# at
# :: server id end_log_pos CRC32 0x4763204a Query thread_id= exec_time= error_code=
于是在从上重新change master to,把偏移量设成120,就一切正常了。
我之前搞Mysql5.5时一直是偏移量107的,到了现在5.6了变成了120,有趣。
另外也是头脑反应慢了些,其实在主上看状态时也应该能反应到的:
mysql> show binary logs;
+---------------+-----------+
| Log_name | File_size |
+---------------+-----------+
| binlog. | |
| binlog. | |
| binlog. | |
+---------------+-----------+
rows in set (0.03 sec)
 
 

mysql5.6设置主从报错1236,Increase max_allowed_packet on master,原因却是Binlog偏移量不对的更多相关文章

  1. MySQL主从报错1594

    一.主从报错 Relay log read failure 问题原因,MySQL主从使用的是kvm虚拟机,物理机超分严重,在负载高的情况下会kill掉占用资源最多的虚拟机,再启动后导致主从失败 mys ...

  2. mysql5.7同步复制报错1060故障处理

    mysql5.7同步复制报错故障处理 # 报错 1060,具体如下Last_Errno: 1060Last_Error: Coordinator stopped because there were ...

  3. ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE

    ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE 打开 /app/base/lib/application/dbtable.php , 替换A ...

  4. mysql5.6版本备份报错

    MySQL5.6版本备份报错,密码不安全 [root@centos199 mysql]# mysqldump -uroot -ppassword cz-office > mysql38.sqlW ...

  5. mysql主从报错截图

    1.首先确认报错的binlog和last event. 2.然后去主的机器上查看该报错的内容和报错的的位置,如果是结尾报错的,可以直接从新的binlog进行同步. #/mysql/logs# ../b ...

  6. Vue.js报错Failed to resolve filter问题原因

    Vue.js报错Failed to resolve filter问题原因 金刚 vue Vue.js js javascript 之前使用vue.js写分页功能时,写了一个过滤器,发现一个比较奇怪的错 ...

  7. 运维与开发的开车现场之MySQL5.7创建触发器报错解决过程

    报错内容如下: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds ...

  8. mysql5.7初始化密码报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before

    mysql初始化密码常见报错问题1,mysql5.6是密码为空直接进入数据库的,但是mysql5.7就需要初始密码 cat /var/log/mysqld.log | grep password1 2 ...

  9. mysql5.7初始化密码报错ERROR1820(HY000):YoumustresetyourpasswordusingALTERUSERstateme

    1,mysql5.6是密码为空直接进入数据库的,但是mysql5.7就需要初始密码 cat /var/log/mysqld.log | grep password 或者:grep 'temporary ...

随机推荐

  1. myeclipse中,项目上有个叉报错,文件没有错误

    同事将他的java项目交接给了我.和平时的交接一样.他把他最新的源码.打成压缩包,发给我. 我解压后.使用myeclipse开发工具.通过导入,将项目导入到我的开发工具中.这个时候有一个问题出现了.在 ...

  2. C的xml编程文章链接

    官方地址:http://www.xmlsoft.org/ http://hi.baidu.com/singyea/item/ed4d1c335a9527b8633aff82 http://os.chi ...

  3. cocos2d-x2.x环境搭建配置

    [安装工具] VS2012 Cocos2D-X 2.2.3 Python 2.7.8 一.运行cocos2dx中的hello world! 1.在Cocos2D-X 2.2.3目录下,点击cocos2 ...

  4. openGL点精灵PointSprite具体解释: 纹理映射,旋转,缩放,移动

    第一,什么是点精灵 openGL的图形由顶点构成,以后利用顶点进行纹理的映射.点精灵就是,一个顶点被当作一个精灵来处理.特别之处就是,一个顶点也可进行纹理贴出.比如,原来是个顶点构成的一个矩形,如今一 ...

  5. Callable 获取线程返回值

    allable与 Future 两功能是Java在兴许版本号中为了适应多并法才增加的,Callable是类似于Runnable的接口,实现Callable接口的类和实现Runnable的类都是可被其它 ...

  6. Cocos2d-x 3.0 红孩儿私人义务教育 - 第一章 熟人Cocos2d-x 3.0project

     Cocos2d-x 3.0 红孩儿私家必修 前言: 时光飞逝,每每看到博客上的回复和微博上的鼓舞,总会认为亏欠大家点什么.停下来太久.总是认为不太对劲,哈哈,时习之吧,望以此勉励大家. 红孩儿C ...

  7. Connecting Docker for Cloud Services using SDN and Network Virtualization

     Abstract The explosive scale of container CPUs needs highly efficient network virtualization Chal ...

  8. Parallel Python——一个简单的分布式计算系统

    如何建立一个高速的分布式计算平台?Parallel python此目的. Parallel Python(http://www.parallelpython.com/content/view/15/3 ...

  9. C# Windows Phone 8 WP8 开发,将WebClient的DownloadStringCompleted事件改成非同步的awiat方法。

    原文:C# Windows Phone 8 WP8 开发,将WebClient的DownloadStringCompleted事件改成非同步的awiat方法. 一般我们在撰写Windows Phone ...

  10. Ewebeditor最新漏洞和漏洞指数

    Ewebeditor最新漏洞和漏洞指数[收集] 来源:转载作者:佚名时间:2009-06-03 00:04:26 下面文章收集转载于网络:) 算是比較全面的ewebeditor编辑器的漏洞收集,如今的 ...