freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

讀寫分離的三種方法(參考版)

2024-11-06 21:39本頁面
  

【正文】 MMM, a greate project! MMM的基本信息請參考它的網(wǎng)站 (見后 參考資料 ) MMM有 3 個重要的器件 : mmmd_mon monitoring script which does all m。即 AppSever 總是把 write操作分配某個數(shù)據(jù)庫 (db01),除非 db01 failed,被切換。存在 SPOF:Single point of failure 的設(shè)計在重要系統(tǒng)中是危險的。 DB的設(shè)計對大規(guī)模、高負載的系統(tǒng)是極其重要的。 引言 MasterSlave 的數(shù)據(jù)庫機構(gòu)解決了很多問題,特別是 read/write比較高的 : 寫操作全部在 Master結(jié)點執(zhí)行,并由 Slave數(shù)據(jù)庫結(jié)點定時 (默認 60s)讀取 Master 的 binlog 將眾多的用戶讀請求分散到更多的數(shù)據(jù)庫節(jié)點,從而減輕了單點的壓力 這是對 Replication的最基本陳述,這種模式的在系統(tǒng) Scaleout方案中很有引力 (如有必要,數(shù)據(jù)可以先進行 Sharding,再使用 replication)。), writer(。) (2)當(dāng) db1上 線后 ,mon 會檢測到 ,并且把 reader(。), reader(。), writer(。) db2(): master/ONLINE. Roles: reader(。 啟動 slave 進程 3. 檢查 MasterMaster 是否正常 shell show slave status \G … Slave_IO_Running: Yes Slave_SQL_Running: Yes … 5. DB1 MMM 配置 : shell ln s /usr/local/mysql/bin/mysql_config /sbin/mysql_config 由于編譯安裝需要執(zhí)行此命令 shell ln s /usr/local/mysql/lib/mysql/ /usr/lib/ 由于編譯安裝需要執(zhí)行此命令 shell cpan Algorithm::Diff Proc::Daemon Time::HiRes DBI DBD::mysql shell yum y install iproute 如果已經(jīng)安裝 會提示已經(jīng)安裝 shell wget shell tar xvf shell cd shell perl . shell cp /usr/local/mmm/etc/examples/ /usr/local/mmm/etc/ shell vi /usr/local/mmm/etc/ ———————————以下是我 ——————————— MasterMaster Manager config (agent) Debug mode debug no Paths pid_path /usr/local/mmm/var/ bin_path /usr/local/mmm/bin Logging setup log mydebug file /usr/local/mmm/var/ level debug log mytraps file /usr/local/mmm/var/ level trap MMMD mand socket tcpport and ip bind_port 9989 Cluster interface cluster_interface eth0 Define current server id this db1 mode master For masters peer db2 Cluster hosts addresses and access params host db1 ip port 3306 user rep_agent password RepAgent host db2 ip port 3306 user rep_agent password RepAgent ———————————以上是我 ——————————— shell /usr/local/mmm/scripts/shell lsof i:9989 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME perl 2466 root 3u IPv4 7740 TCP *:9989 (LISTEN) 4. DB2 MMM 配置 : shell ln s /usr/local/mysql/bin/mysql_config /sbin/mysql_config shell ln s /usr/local/mysql/lib/mysql/ /usr/lib/ shell cpan Algorithm::Diff Proc::Daemon Time::HiRes DBI DBD::mysql shell yum y install iproute 如果已 經(jīng)安裝 會提示已經(jīng)安裝 shell wget shell tar xvf shell cd shell perl shell cp /usr/local/mmm/etc/examples/ /usr/local/mmm/etc/ shell vi /usr/local/mmm/etc/ ———————————以下是我 ——————————— MasterMaster Manager config (agent) Debug mode debug no Paths pid_path /usr/local/mmm/var/ bin_path /usr/local/mmm/bin Logging setup log mydebug file /usr/local/mmm/var/ level debug log mytraps file /usr/local/mmm/var/ level trap MMMD mand socket tcpport and ip bind_port 9989 Cluster interface cluster_interface eth0 Define current server id this db2 mode master For masters peer db1 Cluster hosts addresses and access params host db1 ip port 3306 user rep_agent password RepAgent host db2 ip port 3306 user rep_agent password RepAgent ———————————以上是我 ——————————— shell /usr/local/mmm/scripts/shell lsof i:9989 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME perl 2736 root 3u IPv4 7740 TCP *:9989 (LISTEN) 4. MOD 配置 : shell ln s /usr/local/mysql/bin/mysql_config /sbin/mysql_config shell ln s /usr/local/mysql/lib/mysql/ /usr/lib/ shell cpan Algorithm::Diff Proc::Daemon Time::HiRes DBI DBD::mysql shell yum y install iproute 如果已經(jīng)安裝 會提示已經(jīng)安裝 shell yum y install subversion shell svn checkout shell cd trunk shell perl shell cp /usr/local/mmm/etc/examples/ /usr/local/mmm/etc/ shell vi /usr/local/mmm/etc/ ——————————–以下是我配置文件 內(nèi)容 ——————————— MasterMaster Manager config (monitor) Debug mode debug no Paths pid_path /usr/local/mmm/var/ status_path /usr/local/mmm/var/ bin_path /usr/local/mmm/bin Logging setup log mydebug file /usr/local/mmm/var/ level debug log mytraps file /usr/local/mmm/var/ level trap MMMD mand socket tcpport bind_port 9988 agent_port 9989 monitor_ip Cluster interface cluster_interface eth0 Cluster hosts addresses and access params host db1 ip port 3306 user rep_monitor password RepMonitor mode master peer db2 host db2 ip port 3306 user rep_monitor password RepMonitor mode master peer db1 Define roles active_master_role writer Mysql Reader role role reader mode balanced servers db1, db2 ip , Mysql Writer role role writer mode exclusive servers db1, db2 ip Checks parameters Ping checker check ping check_period 1 trap_period 5 timeout 2 Mysql checker check mysql check_period 1 trap_period 2 timeout 2 Mysql replication backlog checker check rep_backlog check_period 5 trap_period 10 max_backlog 60 timeout 2 Mysql replication threads checker check rep_threads check_period 1 trap_period 5 timeout 2 ———————————以上是我配置文件 內(nèi)容 —————————— shell /usr/local/mmm/scripts/shell mmm_control set_online db1 讓 DB1 服務(wù)器上線 shell mmm_control set_online db2 讓 DB2 服務(wù)器上線 shell mmm_control show Config file: Daemon is running! Servers status: db1(): master/ONLINE. Roles: reader(。 繼續(xù)返回 db1 mysql change master to master_host=”″, master_user=”master”, master_password=”master”, master_log_file=”″, mas
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1