暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
实战多个slave的MySQL上架构lvs DR.pdf
75
9页
2次
2024-06-17
5墨值下载
资源由 www.eimhe.com 美河学习在线收集提供
一、实现 AB 复制,模式 A-B-B
Php 网页读数据从 192.168.17.250 上读,写往 192.168.17.8 上写
192.168.17.7 lvs
192.168.18.2 apache 服务器
192.168.18.1 route 路由器
192.168.17.2
192.168.17.250 vip
192.168.17.8 Master mysql
192.168.17.9 Slave1 mysql
192.168.17.10 Slave2 mysql
既实现了读写分离也实现了 lvs 分发
1.配置 master mysql slave mysql
Master 上的配置文件
master#vim /etc/my.cnf
master#cat /etc/my.cnf
[mysqld]
server_id=1
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
资源由 www.eimhe.com 美河学习在线收集提供
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
log-bin=binlog
log-bin-index=binlog.index
sync-binlog=1
expire_logs_day=10
max_binlog_size = 1G
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
master#
Slave1 上的配置文件
[mysqld]
server_id = 2
relay_log = /var/lib/mysql/mysql-relay-bin
relay_log_index=/var/lib/mysql/mysql-relay-bin.index
Read-only=1
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
log-bin=binlog
log-bin-index=binlog.index
sync-binlog=1
expire_logs_day=10
max_binlog_size = 1G
of 9
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜