Common Replication Administration Tasks
1473
Range
0 .. 4294967295
Permitted Values
Platform
Bit Size
64
Type
numeric
Default
0
Range
0 .. 18446744073709547520
If the value of this variable is greater than 0, the MySQL server synchronizes its binary log to disk
(using
fdatasync()
) after every
sync_binlog
[1472]
writes to the binary log. There is one write
to the binary log per statement if autocommit is enabled, and one write per transaction otherwise.
The default value of
sync_binlog
[1472]
is 0, which does no synchronizing to disk. A value of 1 is
the safest choice because in the event of a crash you lose at most one statement or transaction from
the binary log. However, it is also the slowest choice (unless the disk has a battery-backed cache,
which makes synchronization very fast).
If the value of
sync_binlog
[1472]
is 0 (the default), no extra flushing is done. The server relies on
the operating system to flush the file contents occasionally as for any other file.
16.1.3. Common Replication Administration Tasks
Once replication has been started it should execute without requiring much regular administration.
Depending on your replication environment, you will want to check the replication status of each slave
periodically, daily, or even more frequently.
16.1.3.1. Checking Replication Status
The most common task when managing a replication process is to ensure that replication is taking
place and that there have been no errors between the slave and the master. The primary statement for
this is
SHOW SLAVE STATUS
, which you must execute on each slave:
mysql>
SHOW SLAVE STATUS\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: master1
Master_User: root
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000004
Read_Master_Log_Pos: 931
Relay_Log_File: slave1-relay-bin.000056
Relay_Log_Pos: 950
Relay_Master_Log_File: mysql-bin.000004
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: 931
Relay_Log_Space: 1365
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:
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...