mySQL SLAVE replication setup

Posted on 2007-07-26
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
    LVL 7

    Accepted Solution

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
    Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
    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…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now