自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

配置MySQL數(shù)據(jù)庫同步的實際操作步驟

數(shù)據(jù)庫 MySQL
我們今天主要向大家介紹的是實現(xiàn)MySQL數(shù)據(jù)庫同步的實例演示,如果你對實現(xiàn)MySQL數(shù)據(jù)庫同步的實際操作有興趣了解的話,你就可以點擊以下文章。

以下的文章主要介紹的是配置MySQL數(shù)據(jù)庫同步的實際操作步驟,我們本次試驗是在MySQL數(shù)據(jù)庫版本 4.1.7-standard-log環(huán)境下對其進行操作 , master 端的實際操作操作系統(tǒng)是 redhat 9.0 , slave 端的操作系統(tǒng)是 redhat 7.3.

 

1.修改 master 端的my.cnf,增加配置參數(shù):

 

  1. [MySQL(和PHP搭配之***組合)d]  
  2. log-bin  
  3. server-id=1 

2. 修改 slave 端的my.cnf,增加配置參數(shù):

  1. log-bin  
  2. mastermaster-host=master  
  3. master-user=rep 
  4. master-password=rep 
  5. master-port=3306 
  6. server-id=2 

以上參數(shù)都是最基本的配置,就不多解釋了,解下來勢初始化數(shù)據(jù).

1.清空 master 上的所有 binlog,如果現(xiàn)存的 binlog有用的話,請先備份起來;接著把 master 上的所有數(shù)據(jù)文件打包,包括ibdata那些文件.

 

2.類似的方法清空 slave 上的所有 binlog,將 master上的數(shù)據(jù)文件壓縮包拷貝到自身的數(shù)據(jù)文件目錄下.

 

啟動master,新增一個rep用戶

  1. ,"grant all privileges on *.* to rep@% identified by 'rep'; flush privileges; ". 

 

啟動slave,檢測MySQL數(shù)據(jù)庫同步是否成功.

 

一般情況下,不成功的原因是slave連接上master之后定位binlog失敗,這就需要將雙方的binlog都設置成一致,然后stop slave; start slave; 即可.

 【編輯推薦】

  1. 獲得MySQL運行報告,并不難
  2. 提高MySQL連接數(shù),很簡單
  3. 修改MySQL root密碼5步驟介紹
  4. MySQL數(shù)據(jù)庫的同步實例的實際操作
  5. MySQL查詢高速緩沖have_query_cache不得不看
責任編輯:佚名 來源: 互聯(lián)網
相關推薦

2010-05-19 16:31:38

MySQL數(shù)據(jù)庫

2010-06-01 10:17:01

重啟MySQL數(shù)據(jù)庫

2010-05-27 10:17:24

連接MySQL

2010-05-18 11:18:16

MySql 新建

2010-06-11 13:13:38

訪問MySQL數(shù)據(jù)庫

2010-05-28 10:34:39

連接MySQL數(shù)據(jù)庫

2010-05-24 18:56:15

2010-03-31 15:23:43

Oracle數(shù)據(jù)庫軟件

2010-05-14 16:49:43

MySQL 數(shù)據(jù)庫

2010-05-27 14:55:40

簡單備份MySQL

2010-05-20 17:56:43

2010-05-19 15:12:32

導入MySQL

2010-06-12 09:53:19

2010-05-27 10:35:09

查詢MySQL數(shù)據(jù)

2010-05-17 10:11:11

導入Mysql

2010-04-30 14:39:03

Oracle數(shù)據(jù)庫

2010-05-20 16:35:12

2010-06-01 17:45:57

MySQL數(shù)據(jù)庫

2010-05-13 10:19:54

2010-05-28 13:48:07

MySQL數(shù)據(jù)庫密碼
點贊
收藏

51CTO技術棧公眾號