当前位置:Gxlcms > 数据库问题 > MySQL 互主复制 设置

MySQL 互主复制 设置

时间:2021-07-01 10:21:17 帮助过:22人阅读



授权 172.16.1.10 权限
grant replication slave on *.* to ‘slave‘@‘172.16.1.11‘ identified by ‘king123‘;
[mysqld]
log-bin=aaa_10
server-id=1
master-host=172.16.1.11
master-user=slave
master-password=king123
auto-increment-increment=2
auto-increment-offset=1

主MySQL服务器 172.16.1.11

授权172.16.1.10 权限
grant replication slave on *.* to ‘slave‘@‘172.16.1.10‘ identified by ‘king123‘;
[mysqld]
log-bin=bb_11
server-id=2
master-host=172.16.1.10
master-user=slave
master-password=king123
auto-increment-increment=2
auto-increment-offset=2

本文出自 “小郑技术博客” 博客,请务必保留此出处http://ko178.blog.51cto.com/220419/1765213

MySQL 互主复制 设置

标签:identified   服务器 mysql   

人气教程排行