2012-02-20 13 views
0

私は、Wampサーバー上のマスター・スレーブ・レプリケーションを使用してデータベースをレプリケートしようとしています。マスターサーバーで、私はこのように構成Wamp Serverを使用したタイムド・データベース・レプリケーション - スレーブ・レプリケーション用のmysql

# Number of threads allowed inside the InnoDB kernel.The optimal value 
# depends highly on the application, hardware as well as the OS 
# scheduler properties. A too high value may lead to thread thrashing. 
innodb_thread_concurrency=8 

#Defining the directory for logs and database and the server id 
log-bin=C:\wamp\logs\mysql-bin.log 
binlog-do-db=bank 
server-id=2 

::私は私のmy.iniファイルを次のように変更作られている

mysql> CHANGE MASTER TO 
-> MASTER_HOST='(master_ip)', 
-> MASTER_PORT=3306, 
-> MASTER_USER='root', 
-> MASTER_PASSWORD=''; 

:スレーブサーバ上で

mysql> GRANT REPLICATION SLAVE 
-> ON *.* TO 'root'@'slave_ip' 
-> IDENTIFIED BY ''; 

を、私はこれを構成し私はエラーが発生しました:エラー1198:この操作は実行中のスレーブでは実行できません。最初にスレーブストップを実行します。

私はスレーブを停止して何も起こりませんでした。どんな助けもありがとう。マスター上

答えて

0

SHOW MASTER STATUS;

出力は:スレーブ上

+------------------+----------+--------------+------------------+ 
| File    | Position | Binlog_Do_DB | Binlog_Ignore_DB | 
+------------------+----------+--------------+------------------+ 
| mysql-bin.000001 |  107 | karbord_test |     | 
+------------------+----------+--------------+------------------+ 
1 row in set 

STOP SLAVE; 

CHANGE MASTER TO 
MASTER_LOG_FILE='mysql-bin.000001', 
MASTER_LOG_POS=107; 

START SLAVE; 
関連する問題