Add new comment

Want to support HowtoForge? Become a subscriber!
Submitted by Chris Dean (not registered) on Wed, 2009-05-06 12:41.

Here are some additional notes on issues you might encounter during this process:

  1. If your first Master DB (Master 1) contains views (at the time of writing) you'll not be able to use the command "load data from master" to clone Master 1 to Master 2 due to this bug: and you'll have to replicate the existing system some other way e.g. copy and paste data files or stream data via mysqldump

  2. If you use auto incremeneting id's and you're using Master Master with both masters active you might want to consider setting the following options on Master 1 and Master 2 so that the auto increment values don't end up clashing in the case where an insert happens to occur at exactly the same time on both servers:

    Make Master 1 only auto-increment odd numbers by adding this to my.cnf under [mysqld]:
    auto_increment_increment= 2
    auto_increment_offset   = 1


    Make Master 2 only auto-increment even numbers by adding this to my.cnf under [mysqld]:
    auto_increment_increment= 2
    auto_increment_offset   = 2

    This is particularly important if you're using auto increment id columns as primary keys

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.