symptoms:
MySQL master slave copy, when starting slave, the following error occurs:
mysql> start slave;
ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
solution: check the log,
can see the error, it was not found originally./server246-relay-bin.index file, find the reason, because I used an instance of cold backup file recovery, in mysql library slave_relay_log_info table still retain the previous relay_log information, so it caused to start slave error.
mysql provides tools for deleting records: slave reset;
slave reset does a few things when executed:
1, delete slave_master_info, slave_relay_log_info in both tables; 2. Delete all relay log files and recreate new relay log files; 3, will not change the value of gtid_executed or gtid_purged
mysql> reset slave;
Query OK, 0 rows affected (0.01 sec)
mysql> change master to ......
mysql> start slave;
Query OK, 0 rows affected (0.00 sec)
So it’s
so that slave can start.
Read More:
- Mysql start slave error 1201 (HY000)
- MySQL error 1451 23000 foreign key exception handling
- How to Solve All masterha_check_repl Error
- MYSQL login error: mysqladmin: connect to server at’localhost’ failed
- 【Exception】mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table…
- MySQL skip grant tables add user error 1290
- mysql ERROR 1050 (42S01): Table already exists
- After the two hosts set up the master-slave replication of MySQL, the show slave status displays: last_ IO_ Error: error connecting to master ……
- [error handling] when logging into MySQL with CentOS command, an error 1045 (28000) is reported
- MySQL – ERROR 1146 (42S02): Table ‘mysql.user’ doesn’t exist
- Error 1364 (HY000): field ‘SSL_ cipher’ doesn’t have a default value
- MySQL operation and maintenance slave_ skip_ errors
- Error connecting to master, – retry time: 60 retries: 86400
- MySQL error code 1217 (ER_ROW_IS_REFERENCED): Cannot delete or update a parent row: a foreign key co
- MySQL error: error 1010 (HY000) when deleting database
- The problem of master-slave database synchronization stop caused by MySQL deleting data
- Mysql error 1452 – Cannot add or update a child row: a foreign key constraint fails
- An error occurred when opensips started the service“ ERROR:core :db_ check_ table_ Version: invalid version 7 for Table dialog found “
- ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
- Linux (error 1819 (HY000): your password does not satisfy the current policy requirements)