Error Reading Master Configuration Mysql Replication
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
Could Not Initialize Master Info Structure
this site About Us Learn more about Stack Overflow the company Business mysql error error reading master configuration Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask error counting relay log space Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign
Failed To Open The Relay Log
up Error: “could not initailize master info structure” while doing Master Slave Replication in MySQL up vote 26 down vote favorite 6 I am trying to do Master Slave Replication for MySQL. When i am typing the following command: CHANGE MASTER TO MASTER_HOST='10.1.100.1', MASTER_USER='slave_user', MASTER_PASSWORD='slave_password', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=451228; mysql> START SLAVE; it throws the following error: ERROR 1201 (HY000): Could not initialize master info
Could Not Find Target Log During Relay Log Initialization
structure; more error messages can be found in the MySQL error log Any help would be greatly appreciated. mysql replication master slave share|improve this question edited Feb 17 '11 at 20:51 Vijay Dev 9,231145589 asked Feb 17 '11 at 13:22 user619684 131123 add a comment| 2 Answers 2 active oldest votes up vote 89 down vote TRY TO RESET IT, IT DOES MAGIC! ON SLAVE THE SLAVE MYSQL COMMAND TYPE: RESET SLAVE; THEN TRY AGAIN: CHANGE MASTER TO MASTER_HOST='10.1.100.1', MASTER_USER='slave_user', MASTER_PASSWORD='slave_password', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=451228; mysql> START SLAVE; share|improve this answer answered Mar 29 '12 at 21:10 Neo 4,70913655 1 thanks a lot, had same problem here... –eran Nov 12 '12 at 16:15 1 Thanks a lot. This worked for me :D Power! (y) hehe –marknt15 May 15 '14 at 7:13 2 Worked for me. This blew my mind. –Logan Bissonnette May 28 '14 at 20:51 2 This is the solution, in my case in happened after doing start slave with a wrong server_id in the slave, stop and start did not work before doing reset. –danigosa Oct 8 '14 at 11:49 aweso
into a little issue setting up a MySQL slave. I have done this a least a have dozen times before, and it is always pretty painless, but this time, change master to I kept getting hung up on error that looked like this: 071118 16:44:10 [ERROR] Failed to open the relay log './-relay-bin.003525' (relay_log_pos 22940879) 071118 16:44:10 [ERROR] Could not find target log during relay log initialization 071118 16:44:10 [ERROR] Failed to initialize the master info structure Googling a little turned up this mysql forum, http://forums.mysql.com/read.php?26,112490,223025#msg-223025 Which then led me to this mysql doc http://stackoverflow.com/questions/5029485/error-could-not-initailize-master-info-structure-while-doing-master-slave-rep page http://dev.mysql.com/doc/refman/5.0/en/replication-howto-additionalslaves.html This was confusing, and didn't really seem like it got to the root of the problem. Why would one slave care about another, if they were both reading from the master? I think that article would more accurately be called "Making a slave of a slave" or some such, because "Introducing Additional Slaves to an Existing Replication Environment" does not convey http://dev.nuclearrooster.com/2009/03/06/relay-log-issues-when-starting-mysql-replication-slave/ that they are talking about a slave of a slave (which I think they are). Anyway, long and short of it, I removed the ‘master.info' ‘mysqld-relay-bin.*' ‘relay-log.info' ‘relay-log-index.*' from the MySQL data directory, restarted mysql (‘/etc/init.d/mysql restart'), and off to the races. Sometimes, depending on the order you do edit the configs or restart mysql, you can get bad data in those files, and it can lead to crpytic errors. Remove those, and you can always start fresh. This entry was posted in Uncategorized. Bookmark the permalink. 6 thoughts on “Relay log issues when starting MySQL replication slave” Akom says: May 2, 2011 at 1:33 pm That really helped - mine broke with a 5.0 to 5.1 upgrade on the slave (master is still 5.0). Deleted files, started, (it tried to play from beginning of relay logs, with duplicate errors), stop slave, change master to previously shown master position, start slave - and it's all good. Whew DR.J says: September 9, 2011 at 5:22 am Thanks you made my Friday. My instance pointed to the default relay log, even though I had defined a
mysql Log in Or connect using: Facebook Twitter VK Google+ Mail.ru OpenID Error Username: Error Password: Forgot password? Remember me Log in Forgot password? Create an Account Your OpenID URL: http://mysql.livejournal.com/129177.html Log in kiltum (kiltum) wrote in mysql, 2008-06-17 12:53:00 kiltum kiltum mysql 2008-06-17 12:53:00 Previous Share Next ERROR 1201 (HY000): Could not initialize master info structure ... Hello all. I'm so bored to kill this error ... can anybody help me?I have one master and about 10 slave servers. Time to time one (absolutely random) slave server lost replication connection. When relay log i type slave stop; slave start; i see "ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log"When i look at /var/log/mysql.log, i see[ERROR] Failed to open the relay log '/var/run/mysqld/mysqld-relay-bin.000759' (relay_log_pos 235)080617 12:25:45 [ERROR] Could not find target log during relay log initializationOK, "slave reset", drop databases , set MASTER etc, error reading master slave start - and replication does just fine. without any errors. Until the next time.I add to my.cnf next lines:max-relay-log-size=1Mmax-binlog-size=2Mrelay-log=/var/run/mysqld/mysqld-relay-binBut without any effect: replication may work fine long time or break at next hour.Question: how can set replication, that always work ? :)Platform: Linux Fedora 6 & 7, mysql 5.0.45, no any errors about disk or memory. Size of replication tables - about 1-2Mb Post a new comment Error We will log you in after post We will log you in after post We will log you in after post We will log you in after post We will log you in after post Anonymously switch LiveJournal Facebook Twitter OpenId Google MailRu VKontakte Anonymously default userpic Insert Bold Insert Italic Insert Underline Insert Strikethrough Insert Link Insert LJ User Insert Photo Insert Media Post a new comment Preview comment Help 9 comments Post a new comment 9 comments awfief wrote in mysql: ←MySQL Survey pkbarbiedoll wrote in mysql: →Searching against a DATETIME col Follow us: Follow us on Facebook Follow us on Twitter Applications iOS Android Choose language English English (UK) Deutsch D