How to sync a particular table with same name and database name between two different independent networks where replication is not possible?
Asked Answered
R

1

2

pt-table-sync and pt-table-checksum still require the target and destination DBs to be in the same network. Is there an alternative, apart from import/export, replication, and pt-table-sync?

MySQL Version is 5.5 and above.

Repurchase answered 10/3, 2015 at 9:47 Comment(0)
B
1

As root:

mysqldump db table | mysql -h1.2.3.4 -uuser -password db

If permission is denied, this should work in the remote database:

GRANT ALL ON *.* TO 'user'@'server1' IDENTIFIED BY 'password';

Automate using crontab or simply use a specialized tool like pt-table-sync --execute h=host1,D=db,t=tbl h=host2

If you can't reach part of your own network, check your subnet masks.

Bighead answered 12/11, 2015 at 17:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.