I followed this tutorial for master-slave replication: http://www.howtoforge.com/mysql_master_master_replication
Basically, this is what I did.
- Uninstalled mysql on both servers. Installed mysql on both servers.
- Loaded the data onto both servers.
- Followed the replication procedure.
- The replication deleted my tables, then created them again.
- Then, the replication started inserting rows into the table. Then deleting them after they reach 3 million rows...then inserting rows again.
Why can't it just insert all the rows, and make it exactly the same as my master? WHy is it deleting stuff and inserting over and over?
show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host:
Master_User:
Master_Port:
Connect_Retry: 60
Master_Log_File: mysql-bin.000025
Read_Master_Log_Pos: 694442541
Relay_Log_File: mysqld-relay-bin.000039
Relay_Log_Pos: 201628150
Relay_Master_Log_File: mysql-bin.000018
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 201628013
Relay_Log_Space: 8213564485
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 6343
1 row in set (0.00 sec)
ERROR:
No query specified
show master status\G;
*************************** 1. row ***************************
File: mysql-bin.000033
Position: 540194
Binlog_Do_DB: fal
Binlog_Ignore_DB:
1 row in set (0.01 sec)
my.cnf
and the output ofSHOW SLAVE STATUS
on the other server might be handy, too.