时间:2021-07-01 10:21:17 帮助过:29人阅读
slave:
server-id = 2
auto_increment_increment=2
auto_increment_offset=2
4.在Master和Slave上创建相同的库与表
5.开启Slave
(1)240查询Master日志Position
show master status;
(2)在241设置Slave并启动
change master to master_host=‘192.168.1.240‘,master_user=‘slave‘,master_password=‘password‘,master_port=3306,MASTER_LOG_FILE=‘mysql-bin.000007‘, MASTER_LOG_POS=1068;
start slave;
查询slave状态
show slave status\G;
进行数据验证
MySql5.7主从配置
标签:ast 行数据 1.2 auto /var change sql start host