Error Reading Slave Log Configuration
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 this site About Us Learn more about Stack Overflow the company Business Learn more
Slave Failed To Initialize Relay Log Info Structure From The Repository
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges error reading master configuration Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each
Error 1201 Hy000 Could Not Initialize Master Info Structure
other. Join them; it only takes a minute: Sign 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 error 1872 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 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 failed to open the relay log 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 awesome man !!! –Pankaj Katiyar Aug 10 at 12:57 add a comment| up vote 4 down vote Please check several things: 1) Make sure the Master's /etc/my.cnf has server_id actually set Here is why: Replication relies on the server_id. Whenever a query is executed and is recorded in the master's binary log, the server_id of the master is recorded with it. By default, if a server_id is not defined in /etc/my.cnf, the server_id is defaulted to 1. However, the rules MySQL Replication demand that a server_id be exp
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, I kept getting hung up on error that looked like this: 071118 16:44:10
Mysql Error 1872 Slave Failed To Initialize Relay Log
[ERROR] Failed to open the relay log './-relay-bin.003525' (relay_log_pos 22940879) 071118 16:44:10 [ERROR] Could not error counting relay log space find target log during relay log initialization 071118 16:44:10 [ERROR] Failed to initialize the master info structure Googling a little turned up
Could Not Find Target Log During Relay Log Initialization
this mysql forum, http://forums.mysql.com/read.php?26,112490,223025#msg-223025 Which then led me to this mysql doc 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 http://stackoverflow.com/questions/5029485/error-could-not-initailize-master-info-structure-while-doing-master-slave-rep 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 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 http://dev.nuclearrooster.com/2009/03/06/relay-log-issues-when-starting-mysql-replication-slave/ 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 different one. Deleting them worked for me too. Sam says: February 7, 2012 at 11:30 am That worked great for me, after I searched several other places trying to figure out why my replication was no longer working. Thanks so much for posting it! Frank says: April 2, 2012 at 2:18 am Thanks for th hint. Smoking brain before. Chileno says: September 25, 2013 at 7:33 am Cool! Save my time Brandon says: September 29, 2013 a
instance http://dba.stackexchange.com/questions/91706/disable-mysql-replication of JIRA has been disabled. You can use your same credentials to log in to the new JIRA! MariaDB ServerMDEV-8594Error relay log reading slave log configuration - impreciseLog in PrintExport XMLExport Word Details Type: Bug Status: Open Priority: Major Resolution: Unresolved Affects Version/s: 10.0.21 Fix Version/s: 10.0 Component/s: slave failed to Replication Labels: None Description There are 3 if conditions and 7 conditions that all result in the error: msg="Error reading slave log configuration"; (./rpl_rli.cc) Can a more descriptive error be applied for each of the branches. AttachmentsActivity People Assignee: Kristian Nielsen Reporter: Daniel Black Votes: 0 Vote for this issue Watchers: 1 Start watching this issue Dates Created: 2015-08-10 08:43 Updated: 2015-08-11 16:01 Powered by Atlassian4.0 r Terms of use Answers Maintenance schedule Atlassian
log in tour help Tour Start 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 this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; 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 Disable MySQL replication up vote 1 down vote favorite I'm running following: # cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.6 (Santiago) # uname -a Linux X 2.6.32-504.3.3.el6.x86_64 #1 SMP Fri Dec 12 16:05:43 EST 2014 x86_64 x86_64 x86_64 GNU/Linux # rpm -q mysql-server mysql-server-5.1.73-3.el6_5.x86_64 # I issued STOP SLAVE; and deleted master.info and now /var/log/mysqld-error.log is producing following: [ERROR] Error reading master configuration [ERROR] Failed to initialize the master info structure What's the proper way to disable MySQL replication? mysql replication share|improve this question asked Feb 11 '15 at 15:49 alexus 16511 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted After you ran RESET SLAVE; make sure there is no slave status. Run this SHOW SLAVE STATUS\G If there is any information still being presented, you need to run this CHANGE MASTER TO master_host = ''; Then, go run SHOW SLAVE STATUS\G You should get nothing and master.info should be gone. From the MySQL 5.1 Documentation If any startup options for setting connection parameters (such as master host, master port, master user, and master password) are in use, then any corresponding connection information stored in the master.info file is immediately reset using the values specified for these options. Options for which values are not specified are cleared. However, since these options are deprecated in MySQL 5.1 and removed altogether from MySQL 5.5, you are encouraged to use a CHANGE MASTER TO statement instead to reset the connection parameters. (If you do not use the startup options, you must issue CHANGE MASTER TO in such cases if you do not want the connection settings to be cleared.) From the MySQL 5.6 Documentation Connection parameters are reset if the slave mysqld is shut down followi