MariaDB10.0实例部署和多源复制配置(三)

2015-04-07 14:10:06 · 作者: · 浏览: 152

Mysql>START ALL SLAVES;
停止单个同步的命令:
Mysql>STOP SLAVE 'percona';
停止全部的同步的命令为:
Mysql>STOP ALL SLAVES;
当同步建立并正常运行时,会产生relay-log,relay-log的名字为:relay-log-percona.000001,会自动的加上connection_name。
可以使用show all slaves status来查看所有的同步状态,状态信息如下:
MariaDB[(none)]> show all slaves status\G
***************************1. row ***************************
? ? ? ? ? ? ? Connection_name: percona
? ? ? ? ? ? ? Slave_SQL_State: Slave has readall relay log; waiting for the slave I/O thread to update it
? ? ? ? ? ? ? Slave_IO_State: Waiting formaster to send event
? ? ? ? ? ? ? ? ? Master_Host: 192.168.2.200
? ? ? ? ? ? ? ? ? Master_User: repl
? ? ? ? ? ? ? ? ? Master_Port: 3307
? ? ? ? ? ? ? ? Connect_Retry: 60
? ? ? ? ? ? ? Master_Log_File: mysql-bin.000021
? ? ? ? ? Read_Master_Log_Pos: 450752689
? ? ? ? ? ? ? Relay_Log_File:relay-log-percona.000011
? ? ? ? ? ? ? ? Relay_Log_Pos: 135537605
? ? ? ? Relay_Master_Log_File: mysql-bin.000021
? ? ? ? ? ? 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: mysql.%,test.%
? ? ? ? ? ? ? ? ? Last_Errno: 0
? ? ? ? ? ? ? ? ? Last_Error:
? ? ? ? ? ? ? ? Skip_Counter: 0
? ? ? ? ? Exec_Master_Log_Pos: 450752689
? ? ? ? ? ? ? Relay_Log_Space: 135537904
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
? ? ? ? ? ? Master_Server_Id: 111156
? ? ? ? ? ? ? Master_SSL_Crl:
? ? ? ? ? Master_SSL_Crlpath:
? ? ? ? ? ? ? ? ? Using_Gtid: No
? ? ? ? ? ? ? ? ? Gtid_IO_Pos:
? ? ? ? Retried_transactions: 0
? ? ? ? ? Max_relay_log_size: 1073741824
? ? ? ? Executed_log_entries: 106216
? ? Slave_received_heartbeats: 12
? ? ? Slave_heartbeat_period: 1800.000
? ? ? ? ? ? ? Gtid_Slave_Pos:
***************************2. row ***************************
? ? ? ? ? ? ? Connection_name: percona
? ? ? ? ? ? ? Slave_SQL_State: Slave has readall relay log; waiting for the slave I/O thread to update it
? ? ? ? ? ? ? Slave_IO_State: Waiting formaster to send event
? ? ? ? ? ? ? ? ? Master_Host: 192.168.2.201
? ? ? ? ? ? ? ? ? Master_User: repl
? ? ? ? ? ? ? ? ? Master_Port: 3307
? ? ? ? ? ? ? ? Connect_Retry: 60
? ? ? ? ? ? ? Master_Log_File: mysql-bin.000021
? ? ? ? ? Read_Master_Log_Pos: 450752689
? ? ? ? ? ? ? Relay_Log_File:relay-log-percona.000011
? ? ? ? ? ? ? ? Relay_Log_Pos: 135537605
? ? ? ? Relay_Master_Log_File: mysql-bin.000021
? ? ? ? ? ? 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: mysql.%,test.%
? ? ? ? ? ? ? ? ? Last_Errno: 0
? ? ? ? ? ? ? ? ? Last_Error:
? ? ? ? ? ? ? ? Skip_Counter: 0
? ? ? ? ? Exec_Master_Log_Pos: 450752689
? ? ? ? ? ? ? Relay_Log_Space: 135537904
?。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
? ? ? ? ? ? Master_Server_Id: 111156
? ? ? ? ? ? ? Master_SSL_Crl:
? ? ? ? ? Master_SSL_Crlpath:
? ? ? ? ? ? ? ? ? Using_Gtid: No
? ? ? ? ? ? ? ? ? Gtid_IO_Pos:
? ? ? ? Retried_transactions: 0
? ? ? ? ? Max_relay_log_size: 1073741824
? ? ? ? Executed_log_entries: 106216
? ? Slave_received_heartbeats: 12
? ? ? Slave_heartbeat_period: 1800.000
? ? ? ? ? ? ? Gtid_Slave_Pos:


--------------------------------------分割线 --------------------------------------