Error 1201 Hy000 Could Not Initialize Master Info Structure
Contents |
created relay files in /var/run/mysqld/ which filled up the whole of the error reading master configuration partition and caused errors in the logs. To repair error counting relay log space the problem i ran {{{RESET MASTER}}} on the master db server and removed the failed to open the relay log relay files from the slave. This didn't have the desired affect. >Start slave; "Error reading slave log configuration" I then banged my head against could not find target log during relay log initialization the wall. A blog documented a similar problem whereby the files master.info and relay-bin.info were both empty. And to delete them Gung-Ho I deleted the following sudo rm /var/lib/mysql/relay-log.info sudo rm /var/lib/mysql/master.info sudo rm /var/runmysqld/* Restarted slave and everything was back to normal.... apart from the data
Error 1202
loss. See Mysqldump and restore slave from master using bash Handling other Errors Error "ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log" I opened the syslog where the message said >sudo less /var/log/syslog [ERROR] Failed to open the relay log '/var/run/mysqld/mysqld-relay-bin.000040' (relay_log_pos 202987) I opened up the relay-log.info file >sudo nano /var/lib/mysql/relay-log.info /var/run/mysqld/mysqld-relay-bin.000040 ... In the directory /var/run/mysqld/ and the mysql directory log file mysqld-relay-bin.index there were only three files mentioned, which did not include mysqld-relay-bin.000040. I deleted the the relay-log.info file sudo rm /var/lib/mysql/relay-log.info And restarted mysql slave successfully. Error: "Slave_IO_Running: No" I got this another day mysql> SHOW SLAVE STATUS\G ... Slave_IO_Running: No Slave_SQL_Running: Yes ... The log file defined in "my.cnf" err-log=/data/logs/mysqld/mysqld.log Looking in err-log=/data/logs/mysqld/mysqld.log contained the following lines. 080718 10:35:34 [Note]
Start here for a quick overview of the site Help Center Detailed answers to any questions you might
Got Fatal Error 1236 From Master When Reading Data From Binary Log:
have Meta Discuss the workings and policies of this site About change master to Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads could not find first log file name in binary log index file with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; http://perplexed.co.uk/301_restoring_a_broken_slave.htm it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Hard reboot causes MySQL replication to break up vote 0 down vote favorite I have encountered an issue with my replication setup. Under normal circumstances it http://serverfault.com/questions/715849/hard-reboot-causes-mysql-replication-to-break performs as intended, but it breaks if it encounters a hard reboot (I pull the power cable). Setup The setup consists of two servers, server-1 and server-2. The replication setup is a circular replication. Both servers are slaves replicating from the other host as if it were the master. Software Red Hat 6.5 MySQL 5.1.73-3 MySQL-libs 5.1.73-3 MySQL-server 5.1.73-3 Redundancy configuration The replication configuration is as follows for server-1, and is mirrored for server-2: GRANT REPLICATION SLAVE ON *.* TO 'replicant'; FLUSH TABLES WITH READ LOCK;" #Use "SHOW MASTER STATUS \G;" to determine log position and log file UNLOCK TABLES; # set status on slave server using the values retieved earlier CHANGE MASTER TO MASTER_HOST='server-2', MASTER_USER='replicant', MASTER_LOG_FILE='[log file]', MASTER_LOG_POS=[log pos];" START SLAVE; Error information This information is retrieved when the server-2 has encountered a hard reboot and the replication is broken. server-1 slave status *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: server-2 Master_User: replicant Master_Port: 3306 Connect_Retry: 60 Master_Log_File: bin.000004 Rea
Pinera Email Updates: Status: Closed Impact on me: None Category:MySQL Cluster: Replication Severity:S2 (Serious) https://bugs.mysql.com/bug.php?id=52859 Version:mysql-5.1-telco-7.1 OS:Linux (RedHad 5.4 and CentOS) Assigned to: Martin Skold http://tech.akom.net/archives/50-MySQL-replication-dies-with-ERROR-1201-HY000-Could-not-initialize-master-info-structure.html Tags: 7.1.3, replication, sql node restart, telco-7.1 bzr Triage: Triaged: D2 (Serious) / R6 (Needs Assessment) / E6 (Needs Assessment) View Add Comment Files Developer Edit Submission View Progress Log Contributions [15 Apr 2010 14:42] Carlos Pinera Description: We have multi-master could not replication between two machines. Initially the slave status shows everything is fine. After an SQL node is restarted (/etc/init.d/mysql restart), the slave on that SQL node get an error: 100413 10:15:36 [ERROR] Error reading master configuration 100413 10:15:36 [ERROR] Failed to initialize the master info structure This was working fine with could not find cluster version 7.0.9 and earlier. Setting an explicit entry in my.cnf for master-info-file has no effect. For simplicity I reduced the configuration to two machines, with each machine running a single storage node. It fails the same way with the configuration of two macnines in each cluster and replication between the clusters (total of 4 machines). After the restart the storage and sql nodes are up but the slave has not started. The my.cnf file content for 'andorinha' is: # MySQL Cluster configuation file. [mysqld] ndbcluster # Run the NDB storage engine ndb-connectstring=andorinha.isxinc.com server_id=3 auto_increment_increment=10 auto_increment_offset=3 binlog-format=ROW log-bin=row binlog-ignore-db=test ndb-log-update-as-write=OFF log-slave-updates replicate-same-server-id=0 replicate-ignore-db=test replicate-do-table=mysql.ndb_apply_status replicate-wild-ignore-table=mysql.% relay-log=/var/lib/mysql/andorinha.isxinc.com_rl relay-log-index=/var/lib/mysql/andorinha.isxinc.com_rl1 relay-log-info-file=/var/lib/mysql/relay-log.info slave-net-timeout=60 [mysql_cluster] ndb-connectstring=andorinha.isxinc.com The my.cnf file content for 'canario' is: # MySQL Cluster configuation file. [mysqld] ndbcluster # Run the NDB storage engine ndb-connectstring=canario.isxinc.com server_id=1 auto_increment_increment=10 auto_increment_offset=1 binlog-format=ROW log-bin=row binlog-ignore-db=test ndb-log-update-as-write=OFF log-slave-updates replicate-same-server-id=0 replicate-ignore-db=test replicate-do-table=mysql.ndb_apply_status replicate-wild-ignore-table=mysql.% relay-log=/var/lib/mysql/canario.isxinc.com_rl relay-log-index=/var/lib/mysql/canario.isxinc.com_rl1 relay-log-info-file=/var/lib/mysql/relay-log.info slave-net-timeout=60 [mysql_cluster] ndb-connectstring=canario.isxinc.com ============================================
on Ubuntu Karmic (9.10) | Software RAID in Ubuntu Karmic 9.10 > MySQL replication dies with ERROR 1201 (HY000): Could not initialize master info structure Posted by Admin • Friday, February 12. 2010 • Category: Linux On a fine happy morning I am greeted with an alert that slave is not running. Running start slave yields this: ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log Enabling the log yielded nothing. Googling yielded This Page that helped me a lot, but I didn't have to do quite as much work all over again. Here is what I did. First, I saved my "SHOW SLAVE STATUS\G" output: ************************** 1. row ************************** Slave_IO_State: Master_Host: 127.0.0.1 Master_User: replication Master_Port: 3307 Connect_Retry: 60 Master_Log_File: mysqld-bin.000401 Read_Master_Log_Pos: 98 Relay_Log_File: mysqld-relay-bin.006135 Relay_Log_Pos: 242 Relay_Master_Log_File: mysqld-bin.000401 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: 98 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 1 row in set (0.00 sec) Next I followed instructions from the blog I mentioned above: STOP SLAVE; RESET SLAVE; Instead of fully reconfiguring I simply tried to start slave. This is a bad idea because it seems to just try to start slaving off the front of the first binlog file it finds, getting conflicts (or worse). So I tried something simple: mysql> CHANGE MASTER TO MASTER_LOG_POS=98 , MASTER_LOG_FILE = 'mysqld-bin.000401'; Query OK, 0 rows affected (0.04 sec) mysql> start slave; Query OK, 0 rows affected (0.00 sec) The position comes from the output I saved before It's working fine again. Still don't know what caused this - possibly random remote server power cycling... 0 Trackbacks Trackback specific URI for this entry No Trackbacks 2 Comments Display comments as (Linear | Threaded) Anonymous on 2010-12-22 09:15: dude you are awesome..thanks alot Anonymous on 2011-06-07 08:34: You just saved me a lot of time and a lot of Advil. Thanks! Add Comment Name Email Homepage [ Top level ]#1: Anonymous on 2010-12-22 09:15 #2: Anonymous on 2011-06-07 08:34 Y