我是MySQL Master-Slave的初學者。binlog-do-db和replicate-do-db有什麼不同?
我已經閱讀了兩篇教程。
在第一教程。這讓我
[mysqld] Master section
log-bin
server_id=1
replicate-do-db=employees
bind-address=192.168.0.18
[mysqld] SLAVE Section
server_id=2
replicate-do-db=employees
但在第二個教程,它告訴我,
[mysqld] Master
server_id=1
log-basename=master
log-bin
binlog-format=row
binlog-do-db=unixmen
[mysqld] Slave
server-id = 2
replicate-do-db=unixmen
爲什麼我應該LOCK TABLES,並mysqldump的SQL,然後將它導入?
FLUSH TABLES WITH READ LOCK;
這些設置實際上相當危險 - 它導致我們的數據庫缺失數據 - 請閱讀 - https://www.percona.com/blog/2009/05/14/why-mysqls-binlog-do-db-option -is危險/ – JosMac