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

该问题的一般是由relay log没有在配置文件定义所致。

1、问题描述:

mysql> start slave;

mysql> system perror 1872

MySQL error code 1872 (ER_SLAVE_RLI_INIT_REPOSITORY): Slave failed to initialize relay log info structure from the repository

2、处理办法
2.1、修改配置文件

诸如在my.cnf配置文件中添加如下项:

relay_log = /opt/mysql/logs/mysql-relay-bin

重启mysql实例使其生效。

2.2、重新连接master

mysql> stop slave;

Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> change master to master_host=‘192.168.2.10‘,master_user=‘repl_user‘,master_password=‘123456‘,master_log_file=‘mysql-bin.000002‘,master_log_pos=821301;

Query OK, 0 rows affected, 2 warnings (0.00 sec)

mysql> start slave;

重新连接后问题依旧。

2.3、重新设置slave

mysql> reset slave;

Query OK, 0 rows affected (0.00 sec)

mysql> change master to master_host=‘192.168.2.10‘,master_user=‘repl_user‘,master_password=‘123456‘,master_log_file=‘mysql-bin.000002‘,master_log_pos=821301;

Query OK, 0 rows affected, 2 warnings (0.02 sec)

mysql> start slave;

Query OK, 0 rows affected (0.12 sec)

再次查看slave状态:

mysql> show slave status\G;

*************************** 1. row ***************************

Slave_IO_State: Waiting for master to send event

Master_Host: 192.168.2.10

Master_User: repl_user

Master_Port: 3306

Connect_Retry: 60

Master_Log_File: mysql-bin.000002

Read_Master_Log_Pos: 824989

Relay_Log_File: mysql-relay-bin.000002

Relay_Log_Pos: 3971

Relay_Master_Log_File: mysql-bin.000002

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

.......

问题解决。

时间: 2024-12-08 18:10:31

ERROR 1872 (HY000): 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

今天在使用冷备份文件重做从库时遇到一个报错,值得研究一下. 版本:MySQL5.6.27 一.报错现象 dba:(none)> start slave; ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository 这个时候查看error.log: 2017-07-17 16:19:02 9022 [ERROR] Failed to open the relay log '.

断重启从库故障:电Last_Error: Slave failed to initialize relay log info structure from the repository

断电重启故障 2017-11-10T21:27:52.791849+08:00 0 [ERROR] Error in Log_event::read_log_event(): 'read error', data_len: 68, event_type: 22017-11-10T21:27:52.791889+08:00 0 [Warning] Error reading GTIDs from relaylog: -12017-11-10T21:27:52.793147+08:00 0 [Not

Slave failed to initialize relay log info structure from the repository

前几天做主从同步的时候没什么问题,今天做双机热备的时候出现了问题,问题如下:Slave failed to initialize relay log info structure from the repository(服务器未能从存储库初始化中继日志信息结构)可能是某些记录的存在导致的把,所以就尝试的用mysql自带的还原给还原了一下,成功了,具体如下:我是在从库做的主库的数据同步,所以在linux中的从库中进行的mysql命令,先停止从库同步操作,再做还原mysql> stop slave;

MySQL报错ERROR1872(HY000):Slave failed to initialize

ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository MySQL 5.6修复从库复制时报错 mysql> start slave; ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository 报错原因: 从库已经存在之前的relay log 解决

MySQL复制ERROR 1794 (HY000): Slave is not configured or failed to initialize properly.

ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log. error log中有类似日志:2016-05-10 17:21:25 1

ERROR 1794 (HY000): Slave is not configured or fai

mysql 5.7在从库停止复制进程时出现错误,原因是将复制信息记录表中了. 错误提示: ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL err

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

大清早收到一个MySQL的自定义语言告警 :replication interrupt,看来是主从同步报错了. 登陆MySQL,执行 show slave status \G 发现salve已经停止了,于是使用 start slave启动,结果有如下报错: 1 ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log

mysql5.7密码过期ERROR 1862 (HY000): Your password has expired. To log in you must change

环境: ubuntu14.04  mysql5.7 一.mysql5.7 密码过期问题 报错: ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords. 翻译: 错误1862(HY000):你的密码已经过期.登录必须改变它使用一个客户端,支持过期的密码. 解决方法: 1. 用忽略授权表的方法进入mysql  

[mysql] ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.

今天安装mysql遇到这样一个问题: ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords. 意思就是密码过期了. 修改密码了: mysql> SET PASSWORD = PASSWORD('abc'); ERROR 1819 (HY000): Your password does not satisfy