mysql master to master replication question

Discussion in 'HOWTO-Related Questions' started by ubutux, Apr 14, 2008.

  1. ubutux

    ubutux New Member

    i have setup master to master replication on deb etch using the howto .It is working well with the single database i used for testing .now i would like to add the rest of the databases to this process .is there another way to add multiple db's or is best to add them one by one ? thanks
  2. falko

    falko Super Moderator ISPConfig Developer

    You must list the databases one by one in the my.cnf files, e.g.:
    replicate-do-db = db1
    replicate-do-db = db2
    replicate-do-db = db3
    binlog-do-db = db1
    binlog-do-db = db2
    binlog-do-db = db3
  3. ubutux

    ubutux New Member

    hi falko thanks again , once i add the other databases one by one to my.cnf will i need to follow the complete howto for each database ? ie: flush tables with read lock ,show master status etc i can follow the howto no problem ,i just dont fully understand this replicating process .thanks again
  4. falko

    falko Super Moderator ISPConfig Developer

    No, you need the read lock just once, and once you have that lock, you can create a dump for all databases that you want to replicate and then copy that dump to the other server.
  5. ubutux

    ubutux New Member

    thanks falko i will start to add the other databases locking and dumping one by one after this will add the lines for each db in my.cnf .

    one other question i have is if one of the mysql servers is down for any period of time and the online server has been adding data to the database as per normal ,once server 2 comes online again will the replication be updated to server 1 current state ?.
    Last edited: Apr 18, 2008
  6. falko

    falko Super Moderator ISPConfig Developer

    That depends on how long the server is down and what you set for expire_logs_days in my.cnf. If the server is down no longer than expire_logs_days, then it should resume automatically. But you should always check that by running
  7. EricTRA

    EricTRA New Member

    Removing replication on node

    Hello Falko,

    I have a question in the other direction of master master replication. I followed your howto, combined it with specific things we needed over here and everything is working just fine.

    If I want to remove replication on a server is it enough to just remove the mentioning in the my.cnf file? I imagine not :)

    In other words can you tell me what actions to perform to remove a host from replication scheme? Or point me to a HowTo?

    Thanks a lot and keep up the good work.


  8. falko

    falko Super Moderator ISPConfig Developer

    Try this:

Share This Page