标签:user src my.cnf 数据库 mys 主服务器 serve creat 主从
主服务器
vim /etc/my.cnf
添加
server-id=1
log-bin=master-bin
log-bin-index=master-bin.index
保存重启
登陆数据库,show master status

附属数据库
同上添加如下内容重启

主数据库

create user repl;

flush privileges;

附属数据库

 

 

 
grant replication slave on *.* to ‘repl‘ @ ‘ 192.168.199.233‘ identified by ‘mysql‘
标签:user src my.cnf 数据库 mys 主服务器 serve creat 主从
原文地址:https://www.cnblogs.com/shufeiyang/p/10765781.html