MySQL master-master replication on different log positions.

Discussion in 'Installation/Configuration' started by Bloodsyphon, Apr 19, 2014.

  1. Bloodsyphon

    Bloodsyphon New Member

    I'm trying to get MySQL replication working following Installing A Web, Email & MySQL Database Cluster On Debian 6.0 With ISPConfig 3

    My question is how do I get both servers to indicate they are on the same master log file and master log position?

    Through a lot of troubleshooting, I was able to get both servers to indicate Slave_IO_Running: Yes and slave_SQL_Running: Yes, but the only way I could do this was to provide different master log files and master log positions. For instances, my primary server is currently at: mysql-bin.000011 | 3743227 and my secondary server is at mysql-bin.000005 | 2901797. They appear to be replicating to each other, but they are just in different positions.

    I did these steps to "sync the two mysql servers" but it doesn't appear to actually sync them. I'm not sure what I am missing with this.
    scp -pr /var/lib/mysql/* [email protected]:/var/lib/mysql/
    scp -pr /etc/mysql/debian.cnf [email protected]:/etc/mysql/debian.cnf

    I also tried syncing the databases using these commands. I don't get any errors, but it doesn't help me get these two servers on the same page.

    mysqldump -u root -p --all-databases > /tmp/all-database.sql
    scp /tmp/all-database.sql

    mysql -u root -p < /tmp/all-database.sql

    Could anyone help me understand how to get these two MySQL servers on the same page?

    EDIT: I think I misunderstood what the position indicated. Is it OK for the position to be different across MySQL servers?
    Last edited: Apr 20, 2014

Share This Page