Mysql Error Failed To Initialize The Master Info Structure
Contents |
233) 091104 11:12:49 [ERROR] Could not find target log during relay log initialization mysql error reading master configuration 091104 11:12:49 [ERROR] Failed to initialize the master info structure
Error 1201 Hy000 Could Not Initialize Master Info Structure
Due to the way in which the master and slaves where failed to open the relay log stoppedthe relay logs got out of sync, hence replication would not restart. Found the solution was to a) make a note of could not find target log during relay log initialization Master_Log_File and Exec_Master_Log_Pos mysql> show slave status\G *************************** 1. row *************************** Slave_IO_State: Master_Host: mk-tacacs-1.auth.as9105.net Master_User: repl Master_Port: 3306 Connect_Retry: 60 Master_Log_File: log-bin.000008 Read_Master_Log_Pos: 9684 Relay_Log_File: mysqld-relay-bin.9339637 Relay_Log_Pos: 233 Relay_Master_Log_File: log-bin.000008 Slave_IO_Running: No Slave_SQL_Running: No Replicate_Do_DB:
Change Master To
Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 9684 Relay_Log_Space: 0 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: NULL b) reset the slave and bypass the relay logs by configuring the replication again. reset slave; CHANGE MASTER TO MASTER_HOST='mk-tacacs-1.auth.as9105.net' CHANGE MASTER TO MASTER_LOG_FILE='log-bin.000008'; CHANGE MASTER TO MASTER_LOG_POS=9684; start slave; Posted by Harjit Lakhan at 12:06 Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest 1 comment: Daniël van Eeden15 November 2014 at 11:40You should reset to the position of the SQL thread, not the position of the I/O Thread.So use Exec_Master_Log_Pos and Relay_Master_Log_File.I/O Thread: Read_Master_Log_Pos and Master_Log_FileSQL Thread: Exec_Master_Log_Pos and Relay_Master_Log_FileAlso be aware of multi threaded slave in 5.6+.ReplyDeleteAdd commentLoad more... Newer Post Old
by Harjit Lakhan on Thu 13 Nov 2014 12:06 UTC ERROR: 091104 11:12:49 [ERROR] Failed to open mysql replication the relay log '/var/run/mysqld/mysqld-relay-bin.9339843' (relay_log_pos 233) 091104 11:12:49 [ERROR] Could not find target log during relay log initialization 091104 11:12:49 [ERROR] Failed to initialize the master info structure Due to the way in which the master and slaves where stoppedthe relay logs got out of sync, hence replication would http://harjitlakhan.blogspot.com/2014/11/failed-to-initialize-master-info.html not restart. Found the solution was to a) make a note of Master_Log_File and Exec_Master_Log_Pos mysql> show slave status\G *************************** 1. row *************************** Slave_IO_State: Master_Host: mk-tacacs-1.auth.as9105.net Master_User: repl Master_Port: 3306 Connect_Retry: 60 Master_Log_File: log-bin.000008 Read_Master_Log_Pos: 9684 Relay_Log_File: mysqld-relay-bin.9339637 Relay_Log_Pos: 233 http://planet.mysql.com/entry/?id=2181124 Relay_Master_Log_File: log-bin.000008 Slave_IO_Running: No Slave_SQL_Running: No Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 9684 Relay_Log_Space: 0 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: NULL b) reset the slave and bypass the relay logs by configuring the replication again. reset slave; CHANGE MASTER TO MASTER_HOST='mk-tacacs-1.auth.as9105.net' CHANGE MASTER TO MASTER_LOG_FILE='log-bin.000008'; CHANGE MASTER TO MASTER_LOG_POS=9684; start slave; Search MySQL Links MySQL Downloads MySQL Docs MySQL Bugs MySQL Forums Planet MySQL © 1995, 2016, Oracle Corporation and/or its affiliates Legal Policies | Your Privacy Rights | Terms of Use Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.
пользователей Категории: Android Howto *nix Cisco Windows Веб-приложения Деньги Развлекуха Разное Рецепты Цитатник Mysql: Failed to initialize the master http://avz.org.ua/wp/2013/03/13/mysql-failed-to-initialize-the-master-info-structure-error_code-1593/ info structure, Error_code: 1593 После очередного обновления MySQL (c версии 5.5.13 на 5.6.10) репликация почему-то развалилась с таким вот жутко информационно насыщенным сообщением об ошибке: mysql> start slave; ERROR 1593 (HY000): Fatal error: %s А в error.log появляется mysql error такое: 2013-03-13 12:35:59 30937 [ERROR] Slave SQL: Fatal error: Failed to initialize the master info structure, Error_code: 1593 Лечится так. На slave-е говорим: mysql> RESET SLAVE ALL; Query OK, 0 rows affected (0.00 sec) Удаляем на slave-е все relay-логи: [root]# master info structure cd /var/lib/mysql [root /var/lib/mysql]# ls *relay-bin* dc333-relay-bin.003213 dc333-relay-bin.003214 dc333-relay-bin.index [root /var/lib/mysql]# rm *relay-bin* Перезапускаем репликацию заново:
mysql> CHANGE MASTER TO MASTER_HOST='10.10.10.10', MASTER_PORT=3306, MASTER_USER='repl', MASTER_PASSWORD='Ua4R5hW', MASTER_LOG_FILE='serv1-bin.003147', MASTER_LOG_POS=120; Query OK, 0 rows affected, 2 WARNINGS (0.01 sec) mysql> START SLAVE; Query OK, 0 rows affected (0.00 sec) mysql> SHOW SLAVE STATUS \G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 10.10.10.10 Master_User: repl Master_Port: 3306 Connect_Retry: 60