MySQL Sync Table from Host A to Host B

Vote 0 Votes

若 Host A 與 Host B 之間有 table 需要 Sync, 資料量不大, 不需很即時, 還用不到 Replication, 可排程執行
mysqldump -h Host_A -uuser -ppassword db_name table_name | ssh Host_B "mysql -uuser -ppassword db_name"
(ssh 要先建好 Key)
若 Host A 有設定 gtid_mode=ON, mysqldump 需加上參數 --set-gtid-purged=OFF

About this Entry

This page contains a single entry by Pank published on April 10, 2018 4:11 PM.

Let's Encrypt Wildcard Certificate Batch Processing was the previous entry in this blog.

Rsyslog missing log is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives