参考这里:
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.