Change Replication Slave Mysql
Untuk mysql
-
CHANGE MASTER TO MASTER_HOST='msi.ravintolasky.com', MASTER_USER='replication', MASTER_PASSWORD='8beAuM2sGOCqoBgn';
-
CHANGE MASTER TO MASTER_HOST='msi.ravintolasky.com', MASTER_USER='replication', MASTER_PASSWORD='8beAuM2sGOCqoBgn', MASTER_LOG_FILE='mysql-bin.002248', MASTER_LOG_POS=44841564;
-
Slave_IO_State: Master_Host: msi.ravintolasky.com Master_User: ravintola Master_Port: 3306 Connect_Retry: 60 Master_Log_File: mysql-bin.013738 Read_Master_Log_Pos: 1120694699 Relay_Log_File: e55932cfb9b6-relay-bin.005787 Relay_Log_Pos: 39767547 Relay_Master_Log_File: mysql-bin.013738 Slave_IO_Running: No Slave_SQL_Running: Yes Replicate_Do_DB: cxp_tonberry210_base Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: cxp_tonberry210_base.temp_api_apicalllog,cxp_tonberry210_base.pi_http_log,cxp_tonberry210_base.api_apicalllog_old,cxp_tonberry210_base.ci_sessions,cxp_tonberry210_base.api_apicalllog Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 39767334 Relay_Log_Space: 5415668439 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: 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; the first event 'mysql-bin.013738' at 1120694699, the last event read from '/var/log/mysql/mysql-bin.013738' at 123, the last byte read from '/var/log/mysql/mysql-bin.013738' at 1120694718.' Last_SQL_Errno: 0 Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 1 Master_UUID: 9bb26bda-20fc-11e8-b8ff-9e598bb72e4c Master_Info_File: /var/lib/mysql/master.info SQL_Delay: 0 SQL_Remaining_Delay: NULL Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates Master_Retry_Count: 86400 Master_Bind: Last_IO_Error_Timestamp: 220603 11:14:46 Last_SQL_Error_Timestamp: Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0 Replicate_Rewrite_DB: Channel_Name: Master_TLS_Version:
Kalau keluar seperti ini lagi jalankan
STOP SLAVE; RESET SLAVE; CHANGE MASTER TO MASTER_HOST='msi.ravintolasky.com', MASTER_USER='replication', MASTER_PASSWORD='8beAuM2sGOCqoBgn', MASTER_LOG_FILE='mysql-bin.013738', MASTER_LOG_POS=39767334; # ambil dari Relay_Master_Log_File dan Exec_Master_Log_Pos START SLAVE;
-
Slave_IO_State: Waiting for master to send event Master_Host: msi.ravintolasky.com Master_User: replication Master_Port: 3306 Connect_Retry: 60 Master_Log_File: mysql-bin.015003 Read_Master_Log_Pos: 103793582 Relay_Log_File: e55932cfb9b6-relay-bin.001265 Relay_Log_Pos: 24935739 Relay_Master_Log_File: mysql-bin.014977 Slave_IO_Running: Yes Slave_SQL_Running: No Replicate_Do_DB: cxp_tonberry210_base Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: cxp_tonberry210_base.temp_api_apicalllog,cxp_tonberry210_base.pi_http_log,cxp_tonberry210_base.api_apicalllog_old,cxp_tonberry210_base.ci_sessions,cxp_tonberry210_base.api_apicalllog Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 1594 Last_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Skip_Counter: 0 Exec_Master_Log_Pos: 24935526 Relay_Log_Space: 2886803920 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: 0 Last_IO_Error: Last_SQL_Errno: 1594 Last_SQL_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Replicate_Ignore_Server_Ids: Master_Server_Id: 1 Master_UUID: 9bb26bda-20fc-11e8-b8ff-9e598bb72e4c Master_Info_File: /var/lib/mysql/master.info SQL_Delay: 0 SQL_Remaining_Delay: NULL Slave_SQL_Running_State: Master_Retry_Count: 86400 Master_Bind: Last_IO_Error_Timestamp: Last_SQL_Error_Timestamp: 220710 22:57:45 Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0 Replicate_Rewrite_DB: Channel_Name:
STOP SLAVE; RESET SLAVE; CHANGE MASTER TO MASTER_HOST='msi.ravintolasky.com', MASTER_USER='replication', MASTER_PASSWORD='8beAuM2sGOCqoBgn', MASTER_LOG_FILE='mysql-bin.014977', MASTER_LOG_POS=24935526; START SLAVE;
-
STOP SLAVE; RESET SLAVE; CHANGE MASTER TO MASTER_HOST='msi.ravintolasky.com', MASTER_USER='replication', MASTER_PASSWORD='8beAuM2sGOCqoBgn', MASTER_LOG_FILE='mysql-bin.019264', MASTER_LOG_POS=62174645; START SLAVE;
-
Bandar Djakarta Ancol
RESET SLAVE; # buang semua relay, lalu tarik ulang lagi CHANGE MASTER TO MASTER_HOST='192.168.2.200', MASTER_USER='repl', MASTER_PASSWORD='ravintola2013', MASTER_LOG_FILE='mysql-bin.000120', MASTER_LOG_POS=452136528; # ambil dari MASTER_LOG_FILE=Relay_Master_Log_File dan MASTER_LOG_POS=Exec_Master_Log_Pos START SLAVE;```