Databases Reference
In-Depth Information
events have been fetched and executed (your results will vary). If you make a change
on the master, you should see the various file and position settings increment on the
replica. You should also see the changes in the databases on the replica!
You will also be able to see the replication threads in the process list on both the master
and the replica. On the master, you should see a connection created by the replica's
I/O thread:
mysql> SHOW PROCESSLIST\G
*************************** 1. row ***************************
Id: 55
User: repl
Host: replica1.webcluster_1:54813
db: NULL
Command: Binlog Dump
Time: 610237
State: Has sent all binlog to slave; waiting for binlog to be updated
Info: NULL
On the replica, you should see two threads. One is the I/O thread, and the other is the
SQL thread:
mysql> SHOW PROCESSLIST\G
*************************** 1. row ***************************
Id: 1
User: system user
Host:
db: NULL
Command: Connect
Time: 611116
State: Waiting for master to send event
Info: NULL
*************************** 2. row ***************************
Id: 2
User: system user
Host:
db: NULL
Command: Connect
Time: 33
State: Has read all relay log; waiting for the slave I/O thread to update it
Info: NULL
The sample output we've shown comes from servers that have been running for a long
time, which is why the I/O thread's Time column on the master and the replica has a
large value. The SQL thread has been idle for 33 seconds on the replica, which means
no events have been replayed for 33 seconds.
These processes will always run under the “system user” user account, but the other
column values might vary. For example, when the SQL thread is replaying an event on
the replica, the Info column will show the query it is executing.
 
Search WWH ::




Custom Search