title: Setting up MySQL master - master replication
body: <p>I currently have one master server and want to add another master server for fail over.</p>
  
  <p>On the primary server I've added the following to "my.ini"</p>
  
  <pre><code>server-id = 1
  replicate-same-server-id = 0
  auto-increment-increment = 2
  auto-increment-offset = 1
  log_bin=mysql-bin
  log_error=mysql-bin.err
  binlog_do_db=1
  binlog_do_db=2
  binlog_do_db=3
  binlog_do_db=4
  </code></pre>
  
  <p>Once adding:</p>
  
  <pre><code>master-host = [IP]
  master-user = [usernameslaveuser]
  master-password = [password]
  master-connect-retry = 30
  </code></pre>
  
  <p>The mysql server no longer starts up...
  So I decided to first get the secondary server to work properly.</p>
  
  <p>Problem 2:
  On the new server I've copied over my user files from the "data"/mysql dir of the primary.
  I've also imported all databases with MySQL work bench.</p>
  
  <p>Then I added this to "my.ini": </p>
  
  <pre><code>server-id=2
  replicate-same-server-id = 0
  auto-increment-increment = 2
  auto-increment-offset = 2
  
  master-host = [IP]
  master-user = [usernameslaveuser]
  master-password = [password]
  master-connect-retry = 30
  log_bin=mysql-bin
  log_error=mysql-bin.err
  binlog_do_db=1
  binlog_do_db=2
  binlog_do_db=3
  binlog_do_db=4
  </code></pre>
  
  <p>The server starts up fine, so I decided to add a table inside a replicating database on the master but the changes where not copied over to the secondary server...</p>
  
  <p>I googled a bit and found that I have to run some commands in the mysql command line to make replication work.
  But when I open this on the secondary server it doesn't start...
  When opening it in the command prompt it says mysql.exe: unknown variable 'server-id=2"</p>
  
  <p>Both servers are running Windows Server 2012 R2 and have MySQL 5.6.15 64bit installed.
  Can someone guide me true the last part of setting this up?</p>