mysql主从同步

配置详解

Master服务器
– 应包括希望同步的所有库
– 对采用 MyISAM 的库,可离线备份
主库配置选项
3
Slave 服务器
– 离线导入由 Master 提供的备份
– 清空同名库(若有的话
从库配置选项
4

授权用户

mysql> grant  replication slave on *.*  to  repluser@"192.168.1.6"  identified  by  "1a2b3c4d";
mysql> select  host,user,password  from mysql.user where user='repluser';
mysql> show master status; 

从库配置同步

mysql> change  master to master_host='192.168.1.5',master_user='repluser',master_password='1a2b3c4d',master_log_file='mysql51.000001',master_log_pos=441;

mysql> start slave;

mysql> show slave status\G;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值