LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   MySQL replication (https://www.linuxquestions.org/questions/linux-server-73/mysql-replication-733272/)

Padawan.AVT 06-16-2009 03:31 AM

MySQL replication
 
Hi everyone!

I have some issues with my master-master replication for my local MediaWiki site:
I did all the steps as in the tutorial below:
http://www.howtoforge.com/mysql_mast...er_replication

check slave status & check master status are OK

but when I create some test article in one wiki, no changes appear in another. According to log, replication has started.


Any ideas?

diilbert 06-16-2009 08:43 AM

What is SHOW SLAVE STATUS showing?

Padawan.AVT 06-16-2009 08:48 AM

Code:

mysql>  show slave status\G;
*************************** 1. row ***************************
            Slave_IO_State: Waiting for master to send event
                Master_Host: 10.249.134.144
                Master_User: replication
                Master_Port: 3306
              Connect_Retry: 60
            Master_Log_File: edms-wiki2-bin.000003
        Read_Master_Log_Pos: 29436
            Relay_Log_File: edms-wiki-relay-bin.000002
              Relay_Log_Pos: 240
      Relay_Master_Log_File: edms-wiki2-bin.000003
          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: 29436
            Relay_Log_Space: 240
            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: 0
1 row in set (0.00 sec)

ERROR:
No query specified




And on another one:

Code:

mysql> show slave status\G;
*************************** 1. row ***************************
            Slave_IO_State: Waiting for master to send event
                Master_Host: 10.159.198.144
                Master_User: replication
                Master_Port: 3306
              Connect_Retry: 60
            Master_Log_File: edms-wiki-bin.000007
        Read_Master_Log_Pos: 15706
            Relay_Log_File: edms-wiki2-relay-bin.000006
              Relay_Log_Pos: 15847
      Relay_Master_Log_File: edms-wiki-bin.000007
          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: 15706
            Relay_Log_Space: 15847
            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: 0
1 row in set (0.00 sec)

ERROR:
No query specified


Padawan.AVT 06-16-2009 08:50 AM

Code:

mysql> SHOW PROCESSLIST\G;
*************************** 1. row ***************************
    Id: 3
  User: root
  Host: localhost
    db: NULL
Command: Query
  Time: 0
  State: NULL
  Info: SHOW PROCESSLIST
*************************** 2. row ***************************
    Id: 4
  User: replication
  Host: 10.249.134.144:59569
    db: NULL
Command: Binlog Dump
  Time: 2164
  State: Has sent all binlog to slave; waiting for binlog to be updated
  Info: NULL
*************************** 3. row ***************************
    Id: 27
  User: system user
  Host:
    db: NULL
Command: Connect
  Time: 1565
  State: Waiting for master to send event
  Info: NULL
*************************** 4. row ***************************
    Id: 28
  User: system user
  Host:
    db: NULL
Command: Connect
  Time: 1565
  State: Has read all relay log; waiting for the slave I/O thread to update it
  Info: NULL
4 rows in set (0.00 sec)

ERROR:
No query specified


And on the second:
Code:

mysql> show processlist\G;
*************************** 1. row ***************************
    Id: 53
  User: system user
  Host:
    db: NULL
Command: Connect
  Time: 6142
  State: Waiting for master to send event
  Info: NULL
*************************** 2. row ***************************
    Id: 54
  User: system user
  Host:
    db: NULL
Command: Connect
  Time: 241
  State: Has read all relay log; waiting for the slave I/O thread to update it
  Info: NULL
*************************** 3. row ***************************
    Id: 72
  User: replication
  Host: 10.159.198.144:59414
    db: NULL
Command: Binlog Dump
  Time: 1603
  State: Has sent all binlog to slave; waiting for binlog to be updated
  Info: NULL
*************************** 4. row ***************************
    Id: 73
  User: root
  Host: localhost
    db: NULL
Command: Query
  Time: 0
  State: NULL
  Info: show processlist
4 rows in set (0.00 sec)


fritz001 06-16-2009 09:27 PM

A very good HOWTO about MYSQL MASTER-MASTER replication

http://capttofu.livejournal.com/1752.html


All times are GMT -5. The time now is 03:33 AM.