[C]mysql数据同步最“毒”的一招

0 views
Skip to first unread message

tommy xiao

unread,
Jun 7, 2009, 9:17:00 AM6/7/09
to Coder...@googlegroups.com

参考这里

Also note MySQL should be down when you copy data unless you're copying from snapshot etc.

So to copy go to the mysql data directory on both boxes; such as cd /var/lib/mysql . Make sure target directory is empty. Now on the TARGET server do nc -l 4000 | tar xvf - and on the SOURCE server do tar -cf - . | nc target_ip 4000

Also note - the port you're using should be open in the firewall.

Reply all
Reply to author
Forward
0 new messages