我正在尝试在我的 wamp 服务器上使用主从复制来复制我的数据库。我对 my.ini 文件进行了以下更改:
# 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
在主服务器上我配置了这个:
mysql> GRANT REPLICATION SLAVE
-> ON *.* TO 'root'@'slave_ip'
-> IDENTIFIED BY '';
在从服务器上,我配置了这个:
mysql> CHANGE MASTER TO
-> MASTER_HOST='(master_ip)',
-> MASTER_PORT=3306,
-> MASTER_USER='root',
-> MASTER_PASSWORD='';
我收到错误:错误 1198:无法使用正在运行的从机执行此操作;首先运行停止奴隶。
所以我跑了 stop slave 并没有发生任何事情。任何帮助,将不胜感激。