亚洲精品电影久久久影院_亚洲一区二区自慰另类图片_人人色在线视频播放_99re66热这里只有国产中文精品4_18免费成人网站_亚洲AⅤ无码专区在线观看_一区二区三区欧美视频_亚洲欧美一区二区欧美日韩_欧美性受XXXX狂喷水国产丝袜自慰字幕_啊别j嗯嗯顶到里面了h视频网站,日本精品少妇一区二区三区,亚洲AV无码成人精品区一区,国产高清在线观看AV片麻豆

長(zhǎng)治網(wǎng)站建設(shè)
MySQL 5.5 主從雙向同步

在Red Hat Enterprise Linux平臺(tái),利用MySQL主從同步原理,,實(shí)現(xiàn)MySQL雙向同步
MySQL版本:5.5.28
操作系統(tǒng):RHEL 5.8 32bit

Server1:192.168.1.1
配置:my.cnf


  1. server-id = 1
  2. binlog-do-db = testdb
  3. binlog-ignore-db = mysql
  4. log-slave-updates
  5. replicate-do-db = testdb
  6. replicate-ignore-db = mysql


同步testdb數(shù)據(jù)庫(kù),,這里不對(duì)mysql數(shù)據(jù)庫(kù)進(jìn)行同步
新增同步用戶(hù):


  1. grant replication slave on *.* to [email protected] identified by '123456'; 


啟動(dòng)Sever1;


  1. service mysql start


查看MySQL同步binlog文件名以及pos值:


  1. show master status;


Server2:192.168.1.2
配置:my.cnf


  1. server-id = 2
  2. binlog-do-db = testdb
  3. binlog-ignore-db = mysql
  4. log-slave-updates
  5. replicate-do-db = testdb
  6. replicate-ignore-db = mysql


與Sever1配置基本相同,只是server-id不同,,而且不能相同,,另外記得在[mysqld]配置區(qū)域里配置開(kāi)啟二進(jìn)制日志記錄:log-bin = mysql-bin
新增同步用戶(hù):


  1. grant replication slave on *.* to [email protected] identified by '123456';


啟動(dòng)Server2:


  1. service mysql start


配置同步:


  1. mysql>change master to master_host='192.168.1.1',
  2. mysql>master_user='slaveuser',
  3. mysql>master_password='123456',
  4. mysql>master_port=3306,
  5. mysql>master_log_file='mysql-bin.000020',
  6. mysql>master_log_pos=107;
  7. mysql>slave start;
  8. mysql>show slave statusG;


2006-2014 IT0355.com 山西中聯(lián)科創(chuàng)科技有限公司. All Rights Reserved.
電話(huà):0355-3728808 傳真:0355-3728808
ICP備案號(hào):晉ICP備06003721號(hào)本站已通過(guò)國(guó)際W3C認(rèn)證
關(guān)鍵字:中聯(lián)科創(chuàng),長(zhǎng)治網(wǎng)站建設(shè),,長(zhǎng)治網(wǎng)站推廣,,長(zhǎng)治網(wǎng)絡(luò)工程,長(zhǎng)治軟件開(kāi)發(fā),,山西網(wǎng)站建設(shè),山西軟件開(kāi)發(fā) 長(zhǎng)治五金網(wǎng)