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

Source: Internet
Author: User

The problem is generally caused by the relay log not being defined in the configuration file.

1, Problem Description:

mysql> start slave;

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

mysql> System Perror 1872

MySQL error code 1872 (er_slave_rli_init_repository): SLAVE failed to initialize relay log info structure from the Reposit Ory

2. Treatment methods
2.1. Modify the configuration file

For example, add the following entry in the MY.CNF configuration file:

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

Restart the MySQL instance for it to take effect.

2.2. Reconnect 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;

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

The problem remains after reconnecting.

2.3. Reset 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)

Check the slave status again:

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

.......

Problem solving.

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.