当前位置: 首页 > news >正文

网站建设制度制定情况建站快车凡科

网站建设制度制定情况,建站快车凡科,最值得购买 wordpress,wordpress 插件下载3分钟解决MySQL主从1594错误简介Part1:写在最前1594这个错误看起来挺严重的#xff0c;会提示你binlog文件或者Relay log损坏了,例如binary log is corrupted、relay log is corrupted之类的看起来很吓人是吧#xff0c;多数是由于掉电引发的#xff0c;这也说明了机房配备U…3分钟解决MySQL主从1594错误简介Part1:写在最前1594这个错误看起来挺严重的会提示你binlog文件或者Relay log损坏了,例如binary log is corrupted、relay log is corrupted之类的看起来很吓人是吧多数是由于掉电引发的这也说明了机房配备UPS的重要性。本文来自真实生产案例感谢网友加内特提供本人加以故障重现校验。一起来看下如何解决吧。Part2:完整报错信息mysql show slave statusG*************************** 1. row ***************************Slave_IO_State: Waiting for master to send eventMaster_Host: 192.168.1.250Master_User: mysyncMaster_Port: 3306Connect_Retry: 60Master_Log_File: mysql-bin.000006Read_Master_Log_Pos: 2091061Relay_Log_File: mysql-relay-bin.000002Relay_Log_Pos: 1675027Relay_Master_Log_File: mysql-bin.000006Slave_IO_Running: YesSlave_SQL_Running: NoReplicate_Do_DB:Replicate_Ignore_DB:Replicate_Do_Table:Replicate_Ignore_Table:Replicate_Wild_Do_Table:Replicate_Wild_Ignore_Table:Last_Errno: 1594Last_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the masters binary log is corrupted (you can check this by running mysqlbinlog on the binary log), the slaves relay log is corrupted (you can check this by running mysqlbinlog on the relay log), a network problem, or a bug in the masters or slaves MySQL code. If you want to check the masters binary log or slaves relay log, you will be able to know their names by issuing SHOW SLAVE STATUS on this slave.Skip_Counter: 0Exec_Master_Log_Pos: 1675875Relay_Log_Space: 2093990Until_Condition: NoneUntil_Log_File:Until_Log_Pos: 0Master_SSL_Allowed: NoMaster_SSL_CA_File:Master_SSL_CA_Path:Master_SSL_Cert:Master_SSL_Cipher:Master_SSL_Key:Seconds_Behind_Master: NULLMaster_SSL_Verify_Server_Cert: NoLast_IO_Errno: 0Last_IO_Error:Last_SQL_Errno: 1594Last_SQL_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the masters binary log is corrupted (you can check this by running mysqlbinlog on the binary log), the slaves relay log is corrupted (you can check this by running mysqlbinlog on the relay log), a network problem, or a bug in the masters or slaves MySQL code. If you want to check the masters binary log or slaves relay log, you will be able to know their names by issuing SHOW SLAVE STATUS on this slave.Replicate_Ignore_Server_Ids:Master_Server_Id: 1250Master_UUID: 975d0e4f-bb5d-11e6-98a3-000c29c6361dMaster_Info_File: /data/mysql/master.infoSQL_Delay: 0SQL_Remaining_Delay: NULLSlave_SQL_Running_State:Master_Retry_Count: 86400Master_Bind:Last_IO_Error_Timestamp:Last_SQL_Error_Timestamp: 161205 21:57:01Master_SSL_Crl:Master_SSL_Crlpath:Retrieved_Gtid_Set:Executed_Gtid_Set:Auto_Position: 01 row in set (0.00 sec)解决办法Part1:停止从库mysql stop slave;Query OK, 0 rows affected (0.00 sec)mysql reset slave all;Query OK, 0 rows affected (0.25 sec)mysql  CHANGE MASTER TO MASTER_HOST192.168.1.250,MASTER_USERmysync,MASTER_PASSWORDMANAGER,MASTER_PORT3306,MASTER_LOG_FILEmysql-bin.000006,MASTER_LOG_POS1675875;Query OK, 0 rows affected, 2 warnings (0.01 sec)上述的POS号就是Exec_Master_Log_Pos: 1675875Part2:起库校验mysql start slave;Query OK, 0 rows affected (0.01 sec)mysql show slave statusG*************************** 1. row ***************************Slave_IO_State: Waiting for master to send eventMaster_Host: 192.168.1.250Master_User: mysyncMaster_Port: 3306Connect_Retry: 60Master_Log_File: mysql-bin.000006Read_Master_Log_Pos: 2091061Relay_Log_File: mysql-relay-bin.000002Relay_Log_Pos: 354960Relay_Master_Log_File: mysql-bin.000006Slave_IO_Running: YesSlave_SQL_Running: YesReplicate_Do_DB:Replicate_Ignore_DB:Replicate_Do_Table:Replicate_Ignore_Table:Replicate_Wild_Do_Table:Replicate_Wild_Ignore_Table:Last_Errno: 0Last_Error:Skip_Counter: 0Exec_Master_Log_Pos: 2030552Relay_Log_Space: 415642Until_Condition: NoneUntil_Log_File:Until_Log_Pos: 0Master_SSL_Allowed: NoMaster_SSL_CA_File:Master_SSL_CA_Path:Master_SSL_Cert:Master_SSL_Cipher:Master_SSL_Key:Seconds_Behind_Master: 796Master_SSL_Verify_Server_Cert: NoLast_IO_Errno: 0Last_IO_Error:Last_SQL_Errno: 0Last_SQL_Error:Replicate_Ignore_Server_Ids:Master_Server_Id: 1250Master_UUID: 975d0e4f-bb5d-11e6-98a3-000c29c6361dMaster_Info_File: /data/mysql/master.infoSQL_Delay: 0SQL_Remaining_Delay: NULLSlave_SQL_Running_State: Reading event from the relay logMaster_Retry_Count: 86400Master_Bind:Last_IO_Error_Timestamp:Last_SQL_Error_Timestamp:Master_SSL_Crl:Master_SSL_Crlpath:Retrieved_Gtid_Set:Executed_Gtid_Set:Auto_Position: 01 row in set (0.00 sec)可以看到从库已经开始在追主库了。Part3:checksum校验mysql checksum table helei;-------------------------| Table       | Checksum   |-------------------------| helei.helei | 2698376487 |-------------------------1 row in set (0.00 sec)mysql checksum table helei;------------------------| Table       | Checksum  |------------------------| helei.helei | 416306435 |------------------------1 row in set (0.00 sec)可以看到这里两表已经不一致了虽然从库完成了同步。但需要重进对主从进行校验了。主从校验的方法不是本文重点需要的可移步http://suifu.blog.51cto.com/9167728/1836551[rootHE1 ~]# mysql -uroot -pEnter password:Welcome to the MySQL monitor.  Commands end with ; or g.Your MySQL connection id is 9Server version: 5.6.25-log MySQL Community Server (GPL)Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type help; or h for help. Type c to clear the current input statement.mysql select hostname;------------| hostname |------------| HE1        |------------1 row in set (0.00 sec)mysql select count(*) from helei.helei;----------| count(*) |----------|     4738 |----------1 row in set (0.00 sec)mysql[rootHE3 ~]# mysql -uroot -pEnter password:Welcome to the MySQL monitor.  Commands end with ; or g.Your MySQL connection id is 12Server version: 5.6.25-log MySQL Community Server (GPL)Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type help; or h for help. Type c to clear the current input statement.mysql select hostname;------------| hostname |------------| HE3        |------------1 row in set (0.00 sec)mysql select count(*) from helei.helei;----------| count(*) |----------|     5000 |----------1 row in set (0.00 sec)mysql这里能看到两表的行数也已经不一致了。——总结——MySQL1594通常由于掉电引起虽然报错内容看起来挺吓人的但只要手稳心不慌可以很快解决。由于笔者的水平有限编写时间也很仓促文中难免会出现一些错误或者不准确的地方不妥之处恳请读者批评指正。
http://www.pierceye.com/news/467572/

相关文章:

  • 厦门网站建设u贷款在线申请
  • 做肮脏交义的网站南宁住房和城乡建设局网站
  • 办网站需要什么my23777免费域名查询
  • 销售网站开发步骤网站域名到期了怎么办
  • 怎么做注册账号的网站网页打不开视频播放不了是什么问题
  • 江阴市住房和城乡建设局网站免费网页游戏poki
  • 个人网站设计网站建设的基本特点
  • 泉州专业做网站网站被k 原因
  • 18款禁用网站app直播建设部资质网站
  • 免费完整版的网站模板商丘行业网站建设开发公司
  • 网站与微网站区别推广通
  • 京东网站建设的意义wordpress美图
  • 佛山市外贸网站建设公司营销型网站建设 兼职
  • 四川省城乡与建设厅网站中国十大it培训机构排名
  • 国家高新技术企业查询网站汕头整站优化
  • asp网站生成静态在线网站软件免费下载
  • wordpress古腾堡编辑器广州建网站开发seo型企业网站
  • 易云巢做营销型网站wordpress下载视频播放器
  • google网站哪里找人做网站
  • 外贸网站建设如何做呢百度热搜风云榜
  • ASP网站建设实训报告总结山西建设公司网站
  • 网站建设使用的什么软件房屋设计风格
  • 厦门网站建设公司排名杭州小型网站建设服务
  • 西安建设主管部门官方网站中文搭建式软件开发工具
  • 南通网站建设论文网站首页导航栏怎么做
  • 建设网站的运行费包括什么北京市建设工程信息网安徽兴创
  • 我想在泉州做网站上上海网站设计
  • 百度seo网站优化一 网站开发体会
  • 成都58手机微信网站建设名录tiktok跨境电商好做吗
  • 电子科技 深圳 网站建设怎么做打码网站