[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Replica master to master mysql



Ho questa situazione:
due server mysql.
Nella sezione [mysqld] ho le seguenti "entry":

Sulla macchina vm-pf-db01 ho:
server-id = 1
master-host = vm-pf-db02
master-user = slaveuser
master-password = slavepw
master-port = 3306

Sulla macchina vm-pf-db02 ho:
server-id = 1
master-host = vm-pf-db01
master-user = slaveuser
master-password = slavepw
master-port = 3306

Eseguo su entrambe: "start slave;"

Verificando lo status:
show slave status\G;

sulla vm-pf-db01 ho un errore:
               Slave_IO_State:
                  Master_Host: vm-pf-db02
                  Master_User: slaveuser
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000007
          Read_Master_Log_Pos: 301777644
               Relay_Log_File: mysqld-relay-bin.000038
                Relay_Log_Pos: 149
        Relay_Master_Log_File: mysql-bin.000007
             Slave_IO_Running: No
            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: 301777644
              Relay_Log_Space: 348
              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: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 1236
                Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'
               Last_SQL_Errno: 0
               Last_SQL_Error:
1 row in set (0.00 sec)

ERROR:
No query specified


mentre la vm-pf-db02 sembra apposto:
               Slave_IO_State: Waiting for master to send event
                  Master_Host: vm-pf-db01
                  Master_User: slaveuser
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000006
          Read_Master_Log_Pos: 106
               Relay_Log_File: mysqld-relay-bin.000215
                Relay_Log_Pos: 251
        Relay_Master_Log_File: mysql-bin.000006
             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: 106
              Relay_Log_Space: 552
              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
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error:
               Last_SQL_Errno: 0
               Last_SQL_Error:
1 row in set (0.01 sec)

ERROR:
No query specified


Effettivamente attivando il "debug" su mysql (\W):
sulla vm-pf-db02 ho:
mysql> start slave;
Query OK, 0 rows affected, 1 warning (0.00 sec)

Note (Code 1254): Slave is already running
ovvero il thread slave è avviato (!).

mentre sulla vm-pf-db01 non mi da alcun warning, ogni volta che lo eseguo,
come se lo slave in realtà non si avviasse.

Idee??
Ho dato le grant giuste all'utente.


Walter


--
Per favore non inviatemi allegati in formato MS Office.
Utilizza alternativamente documenti in formato OpenDocument.

http://oinophilos.blogspot.com/

Reply to: