MYSQL: Failed to open the relay log解决办法
程序员文章站
2022-03-16 22:13:24
...
昨天在MySQL主从复制突然就出现了Could not initialize master info structure; more error messages can be found in the MySQL error log。错误,下面来分享我的解决办法。
下面看解决办法
打开log日志发现是因为如下的原因:
111121 15:15:22 [ERROR] Failed to open the relay log ‘./dong-relay-bin.000002′ (relay_log_pos 1067)
111121 15:15:22 [ERROR] Could not find target log during relay log initialization
可以按照下面的方法解决:
1、停止mysql服务
2、在mysql日志目录下删除所有的relay logs,包括hostname-relay-bin.XXX, hostname-relay-bin.index and relay-log.info等等
3、重启mysql服务
这样mysql就会重新生成relay 日志。
推荐阅读
-
Slave failed to initialize relay log info structure from the repository
-
MySQL主库binlog(master-log)与从库relay-log关系代码详解
-
MySQL创建用户时提示“Operation CREATE USER failed for XXX”的解决办法
-
Mysql redo、undo、bin、relay log 区别
-
Slave failed to initialize relay log info structure from the repository
-
MySQL5.1主从同步出现Relay log read failure错误解决方法_MySQL
-
Linux下启动MySQL提示“mysql deamon failed to start”错误的解决办法
-
MySQL5.1主从同步出现Relay log read failure错误解决方法_MySQL
-
mysql relay log参数汇总
-
MySQL Slave relay_log损坏修复