mysql> CHANGE MASTER TO -> MASTER_HOST='master_host_name', -> MASTER_USER='master_user_name', -> MASTER_PASSWORD='master_pass', -> MASTER_LOG_FILE='recorded_log_file_name', -> MASTER_LOG_POS=recorded_log_position; |
mysql> FLUSH TABLES WITH READ LOCK; |
shell> tar zcf /tmp/backup.tar.gz /var/lib/mysql |
mysql>SHOW MASTER STATUS; |
mysql> UNLOCK TABLES; |
mysql> FLUSH TABLES WITH READ LOCK; mysql> SHOW MASTER STATUS; |
mysql> SELECT MASTER_POS_WAIT('log_name', log_offset); |
mysql> UNLOCK TABLES; |
WC \ v WC----> M / | \ / | \ v v v S1 S2 S3 |
WC / | WC | M(unavailable) \ | \ | v v S1<--S2 S3 ^ | +-------+ |
欢迎光临 MariaDB社区 (http://123.56.88.72/) | Powered by Discuz! X3.2 |