grant replication slave on *.* to 'repli'@'%'> 五、 查看master的状态,并记录log-bin文件名及position值
六、 获取master中的log-bin配置slave,并启动slave
change master to master_host='192.168.1.12',master_user='repli',master_password='newpassword',master_log_file='logbin.000018',master_log_pos=155;
start slave;
七、 查看slave状态, 主要是两个参数 Slave_IO_Running、 Slave_SQL_Running均为yes为正常,即可在master创建数据库验证
show slave status \G;
Slave_IO_Running: Yes
Slave_SQL_Running: Yes