重启了一下从库,忘记先stop slave ,直接mysqladmin shutdown关闭实例,结果起不来了

mysql> start slave;
ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository

这个错误就是relay log有问题,但我看自己的配置中有配置relay_log参数,但为什么从库启动会在此处出问题呢

重新开启同步,先记下当前从库同步的位置

mysql> show slave status\G;
*************************** . row ***************************
Slave_IO_State:
Master_Host: 10.*.*.*
Master_User: db_slave
Master_Port:
Connect_Retry:
Master_Log_File: mysql-bin.
Read_Master_Log_Pos:

reset master;
reset slave all;

mysql> CHANGE MASTER TO
-> MASTER_HOST='10.***',
-> MASTER_USER='db_slave',
-> MASTER_PASSWORD='***********',
-> MASTER_PORT=3301,
-> MASTER_LOG_FILE='mysql-bin.013463',
-> MASTER_LOG_POS=247058609,
-> MASTER_CONNECT_RETRY=10;
ERROR 29 (HY000): File '/data/mysql_3301/var/mysql-relay-bin.000001' not found (Errcode: 2 - No such file or directory)

结果还是报错,还是关于relay log的,然后

修改配置文件,新建一个目录,重新为relay log指定一个目录,不再使用原来的目录

relay_log                      = /data/mysql_3301/log/mysql-relay-bin

再次CHANGE MASTER TO……,start slave,这次从库成功启动了

my26_Slave failed to initialize relay log info structure from the repository的更多相关文章

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

    salve复制线程停止,尝试start slave 时报ERROR 1872错误mysql> system perror 1872 MySQL error code 1872 (ER_SLAVE ...

  2. Slave failed to initialize relay log info structure from the repository

    现象 查看slave 服务状态 show slave status\G; 错误 Last_Errno: 1872 Last_Error: Slave failed to initialize rela ...

  3. 【故障处理】ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository

    今天在使用冷备份文件重做从库时遇到一个报错,值得研究一下. 版本:MySQL5.6.27 一.报错现象 dba:(none)> start slave; ERROR (HY000): Slave ...

  4. MySQL复制报错(Slave failed to initialize relay log info structure from the repository)

    机器重启以后,主从出现了问题,具体报错信息: Slave failed to initialize relay log info structure from the repository 解决方案: ...

  5. my32_ error 1872 Slave failed to initialize relay log info structure from the repository

    重启了实例后,slave进程无法开启 Last_SQL_Errno: Last_SQL_Error: Slave failed to initialize relay log info structu ...

  6. mysql报错1872: Slave failed to initialize relay log info structure from the repository

    ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository 在一台主机上增加 ...

  7. mysql 主从关系ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository

    连接 amoeba-mysql出现Could not create a validated object, cause: ValidateObject failed mysql> start s ...

  8. mysql5.7启动slave报错 ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository

    原因:检查my.cnf,原来没指定relay_log,mysql默认产生的relay_log名被该server上的另一个mysql slave占用了. 解决方法:1.在my.cnf中添加 relay_ ...

  9. MySQL主从报错解决:Failed to initialize the master info structure

    大清早收到一个MySQL的自定义语言告警 :replication interrupt,看来是主从同步报错了. 登陆MySQL,执行 show slave status \G 发现salve已经停止了 ...

随机推荐

  1. Tensorflow学习—— AdamOptimizer

    import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_data #载入数据集mnist = inpu ...

  2. IFC—IfcProduct实体继承框架

  3. JavaPersistenceWithHibernate第二版笔记-第七章-004Mapping a map(@MapKeyEnumerated 、 @MapKeyTemporal、@MapKeyColumn)

    一.结构 二.代码 1. package org.jpwh.model.collections.mapofstrings; import org.jpwh.model.Constants; impor ...

  4. review backpropagation

    The goal of backpropagation is to compute the partial derivatives ∂C/∂w and ∂C/∂b of the cost functi ...

  5. 用递归算法返回该元素id下面的所有子集id

    private List<int> listAreaId = new List<int>(); /// <summary> /// 递归获取本区域下面的所有子集 / ...

  6. rabbitmq常用命令行汇总

    最近处理openstack问题时,碰到了rabbitmq相关的问题,使用相关命令行时,经常去现找相关的帖子,感觉很麻烦,记录下自己定位问题时,用到的一些常用命令行,方便以后问题的查找 1)常用的一些查 ...

  7. redis-淘汰策略

    将redis用作缓存时,如果内存空间用满,就会自动驱逐老的数据.默认情况下,memcached就是这种方式. LRU是Redis唯一支持的回收算法. maxmemory配置指令 maxmemory用于 ...

  8. ASPxGridView KeyFieldName

    KeyFieldName="查询表的主键名称"

  9. 「BZOJ1010」[HNOI2008] 玩具装箱toy(斜率优化)

    P教授要去看奥运,但是他舍不下他的玩具,于是他决定把所有的玩具运到北京.他使用自己的压缩器进行压缩,其可以将任意物品变成一堆,再放到一种特殊的一维容器中.P教授有编号为 1⋯N1\cdots N1⋯N ...

  10. js window.open()打开的页面关闭后刷新父页面

    function test(){ var winObj = window.open(URL); var loop = setInterval(function(){ if(winObj.closed) ...