Check Replication Status
To verify that replication has started:
gateway83
To verify that replication has started:
- Open a privileged shell on the SLAVE and log in to the MySQL client:# mysql
- Once logged into MySQL, run this command:show slave status\G;You see a status listing similar to the following:[primary]# mysql -e "SHOW SLAVE STATUS\G"*************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: machine.mycompany.com Master_User: repluser Master_Port: 3307 Connect_Retry: 10Master_Log_File:ssgbin-log.000016 Read_Master_Log_Pos: 5222741Relay_Log_File:ssgrelay-bin.000005 Relay_Log_Pos: 264 Relay_Master_Log_File: ssgbin-log.000016Slave_IO_Running:YesSlave_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: 5222741 Relay_Log_Space: 574 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: 0Master_SSL_Verify_Server_Cert: NoLast_IO_Errno:0 Last_IO_Error: Last_SQL_Errno: 0Last_SQL_Error:Master_Bind: Replicate_Ignore_Server_Ids: Master_Server_Id: 2[primary]#
- Determine the status of the replication by looking at the following lines (shown in bold above):LineDescriptionMaster_Log_FileThe name of the binlog file on the MASTER. If it is missing, then replication will fail. This can happen if replication fails for some reason and enough time has passed such that the binlog has been purged on the MASTER. (By default, this is 10 days by default. See value of expire_logs_days in/etc/my.cnf.)Slave_IO_Running: YesSlave_SQL_Running: YesWhen both these are "Yes", then the slave is healthy.Slave_IO_Running: NoThe IO thread is unable to connect to the master. Reason is listed next to Last_IO_Error.Slave_SQL_Running: NoThe SQL thread is unable to replay a change into the SLAVE database. Reason is listed next to Last_SQL_Error.
When replication is configured, you may proceed to configure the first Gateway processing node.