Learn how to a build a cloud-first strategyRegister Now


mySQL SLAVE replication setup

Posted on 2007-07-26
Medium Priority
Last Modified: 2012-06-27
I have an existing mysql replication setup, currently with 1 master and 2 slaves, I am trying to add a 3rd slave.

I've taken a copy of the DB from the master, and copied to the new slave, and made a note of the master log positions.

I've not got to the stage of starting the new slave yet as I get the following error when I do:

change master to MASTER_LOG_FILE="localhost-bin.017", MASTER_LOG_POS=185656024

Error Code : 1201
Could not initialize master info structure; more error messages can be found in the MySQL error log
(1672 ms taken)

The log file says:

070727 08:21:02  mysqld ended

070727 08:21:20  mysqld started
070727  8:21:20 [Warning] 'user' entry 'root@localhost.localdomain' ignored in --skip-name-resolve mode.
070727  8:21:20 [ERROR] Failed to open the relay log './localhost-relay-bin.000001' (relay_log_pos 4)
070727  8:21:20 [ERROR] Could not find target log during relay log initialization
070727  8:21:20 [ERROR] Failed to initialize the master info structure
/usr/sbin/mysqld: ready for connections.
Version: '4.1.22-standard-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)
070727  8:27:34 [ERROR] Failed to open the relay log './localhost-relay-bin.000001' (relay_log_pos 4)
070727  8:27:34 [ERROR] Could not find target log during relay log initialization

Any suggestions would be awesome!
Question by:dealclickcouk
1 Comment

Accepted Solution

db2inst1 earned 2000 total points
ID: 19583124
Did you do a change master without the log_file position first? Because it looking for the default file and position './localhost-relay-bin.000001'

* Try  the complete change master command with hostname, username, password, port, log_file & port#

* make sure the localhost-bin.017 exists in your log directory, since you have --skip-name-resolve enabled if might be in a different name.

Also is the mysql version of master & slave different? From the bin log naming convention it looks like your are having a older version of master than the slave. It looks like they might not be compatible.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What we learned in Webroot's webinar on multi-vector protection.
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question