Solved

setting up as Master-Master with an existing database

Posted on 2011-02-11
1
498 Views
Last Modified: 2012-05-11
hello,
I have been looking at trying to set up MASTER<->MASTER REPLICATION
the part that concerns me is  the settings:
auto_increment_increment = 10
auto_increment_offset = 1

I am starting with a pretty big exisiting DB where 90% of the tables have auto_increment ID's
is this going to cause a problem?

Thanks
randy
0
Comment
Question by:paries
1 Comment
 
LVL 20

Accepted Solution

by:
Muhammad Wasif earned 500 total points
ID: 34877365
To avoid AUTO_INCREMENT conflicts it will be sufficient.

In server1 you need to set
auto_increment_increment = 10
auto_increment_offset = 1

And in the 2nd server
auto_increment_increment = 10
auto_increment_offset = 2

The problem may arise if you have other unique columns i.e. email address, or usename. In such cases, you need to solve it on you application level or some other rule.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Insert values are dynamic 11 51
How to fix Datetime in MySQL? 4 48
MySQL - need to join three tables 2 46
issue with DB import 1 17
Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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