Mysql Slave Error Reading Master Configuration
Contents |
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 error 1201 hy000 could not initialize master info structure this site About Us Learn more about Stack Overflow the company Business Learn
Error Counting Relay Log Space
more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ mysql error 1872 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
Failed To Open The Relay Log
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 could not find target log during relay log initialization 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
created relay files in /var/run/mysqld/ which filled up the whole of the partition
Mysql Error 1872 Slave Failed To Initialize Relay Log
and caused errors in the logs. To repair the problem
Slave Failed To Initialize Relay Log Info Structure
i ran {{{RESET MASTER}}} on the master db server and removed the relay files failed to open the relay log 'first' (relay_log_pos 4) from the slave. This didn't have the desired affect. >Start slave; "Error reading slave log configuration" I then banged my head against the wall. http://dba.stackexchange.com/questions/91706/disable-mysql-replication 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 loss. See Mysqldump and http://perplexed.co.uk/301_restoring_a_broken_slave.htm 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] Slave I/O thread: connected to master 'replicateuser@1.2.3.4:3306', replication s
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 http://dev.nuclearrooster.com/2009/03/06/relay-log-issues-when-starting-mysql-replication-slave/ on error that looked like this: 071118 16:44:10 [ERROR] Failed to open the https://www.percona.com/blog/2013/04/17/reset-slave-vs-reset-slave-all-disconnecting-a-replication-slave-is-easier-with-mysql-5-5/ 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 page http://dev.mysql.com/doc/refman/5.0/en/replication-howto-additionalslaves.html This was confusing, and didn't really seem like relay log 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 that they are talking about a slave of a slave (which I think they mysql error 1872 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 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 t
Cluster and HA SupportTokuMX SupportMongoDB SupportContact SupportPercona Emergency SupportSupport PoliciesSupport TiersRead MoreConsultingPerformance OptimizationInfrastructure Architecture and DesignHigh AvailabilityUpgrades & MigrationsServer & Database AutomationConsulting PoliciesRead MorePercona Care Software MySQL Database SoftwarePercona ServerPercona XtraDB ClusterPercona XtraBackupPercona TokuDBMySQL Software DocumentationSoftware RepositoriesRead MoreMongoDB Database SoftwarePercona Server for MongoDBMongoDB Software DocumentationPercona TokuMXRead MoreOpen Source Database ToolsPercona Monitoring and ManagementPercona ToolkitPercona Monitoring PluginsDatabase Tools DocumentationRead MoreDocumentation LibraryFind all the documentation you need to set up and manage all our products.Read MoreDownloadsRead More Solutions BuildHighly Scalable Data InfrastructureHighly Available Data InfrastructureData Infrastructure AutomationCloud Data StorageDatabase and Infrastructure Architecture and DesignRead MoreFixPerformance Audit, Tuning and OptimizationServer Audit and StabilizationDatabase Server Outage Restoration24 x 7 ExpertiseData RecoveryRead MoreOptimizeDatabase MonitoringApplication and Server Performance OptimizationInfrastructure Review and Design ServicesExpertise On DemandRead MoreManageRemote Managed ServicesProject Management and AdvisorsTrusted Data AdvisorsDatabase BackupRead More Community Data Performance BlogRead from leading data performance experts in Percona's Official blog.Read MoreEventsView all the information about upcoming events and shows where we can meet up!Read MoreForumsAsk Percona database experts for performance help now in our support forums!Read MoreLet's Get SocialTwitterLinkedInGoogle GroupsFacebookRead MoreMySQL 101 Sessions Resources WebinarsPercona offers free webinars about MySQL®, MongoDB®, OpenStack, NoSQL, Percona Toolkit, DBA best practices and more.Read MoreEbooksImportant literature for getting specialized on database management and administration.Read MoreTechnical PresentationsBrowse our library of nearly 300 technical presentations from webinars and events.Read MoreVideosAll t