测试环境:
主库:
操作系统:ubuntu 14.04从库(virtualbox):
操作系统:ubuntu 13.04
问题:
主机跟虚拟机ping不通?
解决方法: 将虚拟机的ubuntu的网络连接方式改为桥接网卡sudo scp -r ./db_data/2015-01-18_10-40-14/ ubuntu@172.16.5.98:/tmp命令提示“ssh: connect to host 172.16.5.98 port 22: Connection refused\n lost connection”?
解决方法:ubuntu自带ssh的客户端,服务端需要自己安装,故需要在虚拟机ubuntu上执行命令:sudo apt-get install openssh-server,主机的ssh客户端才能连上虚拟机的ssh服务端主库的my.cnf需要加下面两行,特别是第二行,
server-id = 1
log_bin = /var/log/mysql/mysql-bin
主库 show variables like ‘%log_bin%’,保证log_bin是ON的状态,才能保证主从同步成功
参考链接:http://www.percona.com/doc/percona-xtrabackup/2.1/howtos/setting_up_replication.html