国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

MySQL-MMM安裝指南(Multi-Master Replication Manager for MySQL)

2024-07-24 12:47:38
字體:
來源:轉載
供稿:網友

最基本的MMM安裝必須至少需要2個數據庫服務器和一個監控服務器下面要配置的MySQL Cluster環境包含四臺數據庫服務器和一臺監控服務器,如下:

functioniphostnameserver id
monitoring host192.168.0.10mon-
master 1192.168.0.11db11
master 2192.168.0.12db22
slave 1192.168.0.13db33
slave 2192.168.0.14db44

如果是個人學習安裝,一下子找5臺機器不太容易,可以虛擬機就可以完成。

 配置完成后,使用下面的虛擬IP訪問MySQL Cluster,他們通過MMM分配到不同的服務器。

iproledescription
192.168.0.100writer應用程序應該連接到這個ip進行寫操作
192.168.0.101reader應用程序應該鏈接到這些ip中的一個進行讀操作
192.168.0.102reader
192.168.0.103reader
192.168.0.104reader

結構圖如下:

2. Basic configuration of master 1

First we install MySQL on all hosts:
aptitude install mysql-serverThen we edit the configuration file /etc/mysql/my.cnf and add the following lines - be sure to use different server ids for all hosts:

復制代碼 代碼如下:

server_id = 1
log_bin = /var/log/mysql/mysql-bin.log
log_bin_index = /var/log/mysql/mysql-bin.log.index
relay_log = /var/log/mysql/mysql-relay-bin
relay_log_index = /var/log/mysql/mysql-relay-bin.index
expire_logs_days = 10
max_binlog_size = 100M
log_slave_updates = 1


Then remove the following entry:
bind-address = 127.0.0.1Set to number of masters:
auto_increment_increment = 2Set to a unique, incremented number, less than auto_increment_increment, on each server

auto_increment_offset = 1Do not bind of any specific IP, use 0.0.0.0 instead:

bind-address = 0.0.0.0Afterwards we need to restart MySQL for our changes to take effect:

/etc/init.d/mysql restart

3. Create usersNow we can create the required users. We'll need 3 different users:

function
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 临湘市| 百色市| 化隆| 建德市| 景德镇市| 宁阳县| 同仁县| 罗定市| 社旗县| 白银市| 龙山县| 柏乡县| 遂昌县| 阿尔山市| 桓台县| 灵川县| 漳浦县| 鹤峰县| 湘潭县| 河西区| 青海省| 长海县| 漾濞| 崇仁县| 贺兰县| 武川县| 潍坊市| 兖州市| 通许县| 荆门市| 保靖县| 周宁县| 旌德县| 菏泽市| 苍溪县| 翁源县| 翼城县| 枣强县| 长春市| 潜江市| 黄冈市|