- [M] myql> FLUSH TABLES WITH READ LOCK;
- [M] $ mysqldump --all-databases --master-data | bzip2 -9 > mysql.bz2
- [M] scp mysql.bz2 foo@SLAVE:
- [S] mysql> STOP SLAVE;
- [S] bzip2 -dc | mysql -u root -p
- [M] mysql> RESET MASTER;
- [S] mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=147;
- [S] mysql> START SLAVE;
- [M] UNLOCK TABLES;
沒有留言:
張貼留言