今天在优化io的时候,移动了从库relay-bin的位置,并将hostname部分去掉了,启动后,从库slave状态如下:

mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: 127.0.0.1
Master_User: root
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000226
Read_Master_Log_Pos: 175251675
Relay_Log_File: iZ23nn1p4mjZ-relay-bin.000464
Relay_Log_Pos: 175251629
Relay_Master_Log_File: mysql-bin.000226
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_Do_DB: db_rsk,db_sys
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table: db_rsk.tb_act_unitequitiesposition,db_rsk.tb_act_productposition,db_rsk.tb_act_productunitasset,db_rsk.tb_act_productaccount,db_rsk.tb_act_unitaccount,db_rsk.tb_act_operationconfig,db_rsk.tb_rsk_assetvaluecompliance,db_rsk.tb_rsk_stockcostcompliance,db_rsk.tb_rsk_stockpoolcompliance,db_rsk.tb_rsk_stockquantitycompliance,db_rsk.tb_rsk_stockvaluecompalince,db_rsk.tb_rsk_tradelimitcompliance,db_rsk.tb_rsk_reversetradecompliance,db_rsk.tb_rsk_navcompliance,db_rsk.tb_rsk_rulescompliancecode,db_rsk.tb_rsk_usernavsection,db_rsk.tb_rsk_complianceset,db_rsk.tb_rsk_customdimensionstock,db_rsk.tb_rsk_customdimensiontype,db_rsk.tb_rsk_indexstock,db_rsk.tb_rsk_indextype,db_rsk.tb_rsk_industryclassification,db_rsk.tb_rsk_industrystock,db_rsk.tb_rsk_industrytype,db_rsk.tb_rsk_userdimensionstock,db_rsk.tb_rsk_userdimensiontype,db_rsk.tb_rsk_productmonitorset,db_rsk.tb_rsk_stockmonitorset,db_sys.tb_sys_bond_info,db_sys.tb_sys_code_map,db_sys.tb_sys_company,db_sys.tb_sys_dictionary,db_sys.tb_sys_exchange_info,db_sys.tb_sys_function_info,db_sys.tb_sys_menu,db_sys.tb_sys_menu_function,db_sys.tb_sys_operator,db_sys.tb_sys_operator_company,db_sys.tb_sys_operator_menu,db_sys.tb_sys_operator_parameter,db_sys.tb_sys_operator_role,db_sys.tb_sys_operator_unit,db_sys.tb_sys_order_direction,db_sys.tb_sys_parameter,db_sys.tb_sys_role,db_sys.tb_sys_role_menu,db_sys.tb_sys_stock_type,db_sys.tb_sys_system_info,db_sys.tb_sys_trade_date,db_sys.tb_sys_trade_time,db_sys.tb_sys_task_ex
Replicate_Wild_Ignore_Table:
Last_Errno: 1872
Last_Error: Slave failed to initialize relay log info structure from the repository
Skip_Counter: 0
Exec_Master_Log_Pos: 175251424
Relay_Log_Space: 0
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
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: 0
Last_IO_Error:
Last_SQL_Errno: 1872
Last_SQL_Error: Slave failed to initialize relay log info structure from the repository
Replicate_Ignore_Server_Ids:
Master_Server_Id: 0
Master_UUID: 96b464e1-b68f-11e6-8321-00163f00368a
Master_Info_File: /usr/local/Percona-Server-5.7.16-10-Linux.x86_64.ssl101/data2/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp: 170314 19:34:56
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
Replicate_Rewrite_DB: (db_act,db_rsk)
Channel_Name:
Master_TLS_Version:
1 row in set (0.00 sec) ERROR:
No query specified

使用start slave命令开启失败:

  mysql> start slave;

  ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository

  使用reset slave命令解决:

  mysql> reset slave;

  Query OK, 0 rows affected (0.01 sec)

  mysql> start slave;

  Query OK, 0 rows affected (0.03 sec)

mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Queueing master event to the relay log
Master_Host: 127.0.0.1
Master_User: root
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000223
Read_Master_Log_Pos: 62998
Relay_Log_File: relay-bin.000003
Relay_Log_Pos: 11565
Relay_Master_Log_File: mysql-bin.000223
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB: db_rsk,db_sys
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table: db_rsk.tb_act_unitequitiesposition,db_rsk.tb_act_productposition,db_rsk.tb_act_productunitasset,db_rsk.tb_act_productaccount,db_rsk.tb_act_unitaccount,db_rsk.tb_act_operationconfig,db_rsk.tb_rsk_assetvaluecompliance,db_rsk.tb_rsk_stockcostcompliance,db_rsk.tb_rsk_stockpoolcompliance,db_rsk.tb_rsk_stockquantitycompliance,db_rsk.tb_rsk_stockvaluecompalince,db_rsk.tb_rsk_tradelimitcompliance,db_rsk.tb_rsk_reversetradecompliance,db_rsk.tb_rsk_navcompliance,db_rsk.tb_rsk_rulescompliancecode,db_rsk.tb_rsk_usernavsection,db_rsk.tb_rsk_complianceset,db_rsk.tb_rsk_customdimensionstock,db_rsk.tb_rsk_customdimensiontype,db_rsk.tb_rsk_indexstock,db_rsk.tb_rsk_indextype,db_rsk.tb_rsk_industryclassification,db_rsk.tb_rsk_industrystock,db_rsk.tb_rsk_industrytype,db_rsk.tb_rsk_userdimensionstock,db_rsk.tb_rsk_userdimensiontype,db_rsk.tb_rsk_productmonitorset,db_rsk.tb_rsk_stockmonitorset,db_sys.tb_sys_bond_info,db_sys.tb_sys_code_map,db_sys.tb_sys_company,db_sys.tb_sys_dictionary,db_sys.tb_sys_exchange_info,db_sys.tb_sys_function_info,db_sys.tb_sys_menu,db_sys.tb_sys_menu_function,db_sys.tb_sys_operator,db_sys.tb_sys_operator_company,db_sys.tb_sys_operator_menu,db_sys.tb_sys_operator_parameter,db_sys.tb_sys_operator_role,db_sys.tb_sys_operator_unit,db_sys.tb_sys_order_direction,db_sys.tb_sys_parameter,db_sys.tb_sys_role,db_sys.tb_sys_role_menu,db_sys.tb_sys_stock_type,db_sys.tb_sys_system_info,db_sys.tb_sys_trade_date,db_sys.tb_sys_trade_time,db_sys.tb_sys_task_ex
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 11360
Relay_Log_Space: 63396
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0

MySQL更改relay-bin名称导致同步停止的解决办法的更多相关文章

  1. MYSQL更改root password时遇到Access Denied的解决办法

    今天在公司虚拟机上装MYSQL之后需要修改root password,然而遇到这样的错误: Access denied for user 'root'@'localhost' (using passw ...

  2. VS开发工具 因插件问题导致 已停止工作 解决办法

    解决方案如下:No1. 开始-->所有程序-->Microsoft Visual Studio 2012-->Visual Studio Tools-->VS2012 开发人员 ...

  3. Asp.Net保存session的三种方法 (Dll文件更新导致session丢失的解决办法)

    1. InProc模式(默认值):asp.net将session保存到当前进程中,这种方式最快,但是不能多台服务器共享session,且会话状态数据容易丢失. <sessionState mod ...

  4. Visual Studio2012打开时弹出“遇到异常:这可能是由某个扩展导致的”错误的解决办法

    Visual Studio2012打开时弹出"遇到异常:这可能是由某个扩展导致的"错误的解决办法: 具体问题如下: 分析原因:网上搜集了以下,出现异常的原因是安装了第三方控件,然后 ...

  5. MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法

    MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法 1 问题 [root@localhost m ...

  6. make -f dc_debug.mak 提示错误"/usr/bin/ld:can not find -l***"解决办法

    在公司不同服务器上"make -f ***"程序的时候,有的服务器可以编译通过,有的却提示"/usr/bin/ld:can not find -l***"的错误 ...

  7. mysql存储过程controller的not found造成混乱的解决办法

    打草稿 问题:对于select  var1 into var2 ,单select的结果为空的时候(空的意思是没有找到数据,不是该值为null) ,会触发controller的not found 当游标 ...

  8. Mysql安装错误:Install/Remove of the Service Denied!解决办法

    Mysql安装错误:Install/Remove of the Service Denied!解决办法 在windos 的cmd下安装mysql 在mysql的bin目录下面执行: mysqld -- ...

  9. /usr/bin/ld: cannot find -lxxx 的解决办法

    /usr/bin/ld: cannot find -lxxx 的解决办法 在软件编译过程中,经常会碰到类似这样的编译错误: /usr/bin/ld: cannot find -lhdf5 这表示找不到 ...

随机推荐

  1. js 数组里面任意两个数的和与目标值

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  2. calibur处理ROSETTA输出的多个结构文件,clustering

    下载网址:https://sourceforge.net/projects/calibur/ 安装: $ tar zxvf calibur.tar.gz $ cd calibur $ make 安装完 ...

  3. cocos2dx 3.x(绘制线条)

    // //  MainScene.hpp //  helloworld // //  Created by apple on 16/9/19. // // #ifndef MainScene_hpp ...

  4. Linux基础(一)流程控制

    Shell 流程控制 if 语句语法格式1: 写成一行(适用于终端命令提示符):if [ $(ps -ef | grep -c "ssh") -gt 1 ]; then echo ...

  5. 把Web Services生成服务器端C#、VB。或者接口

    什么是Web Services? Web Services 是应用程序组件 Web Services 使用开放协议进行通信 Web Services 是独立的(self-contained)并可自我描 ...

  6. json_encode转义中文问题

    默认情况下php的 json_decode 方法会把特殊字符进行转义,还会把中文转为Unicode编码形式. 这使得数据库查看文本变得很麻烦.所以我们需要限制对于中文的转义. 对于PHP5.4+版本, ...

  7. Hibernate.基础篇《一》.Hibernate工具类.

    Hibernate.基础篇<一>.Hibernate工具类. 话述: Hibernate.基础篇第一篇,前面是代码.后面再加理论&实践. Hibernate使用的版本是:5.x,在 ...

  8. javascript获取style兼容性问题

    获取css 样式的方法有三种 : style, currentStyle , getComputedStyle style (无兼容性问题) 获取语法: ele.style.attr : 设置语法:e ...

  9. hibernate中configuration和配置文件笔记

    hibernate的核心类和接口 Configuration类 作用:(1)读取hibernate.cfg.xml文件 (2)管理对象关系映射文件<mapping resource=" ...

  10. spark-shell下有提示了,但是发现不能退格

    配好了Spark集群后,先用pyspark写了两个小例子,但是发现Tab键没有提示,于是打算转到scala上试试,在spark-shell下有提示了,但是发现不能退格,而且提示也不是复写,而是追加,这 ...