配置mysql主从复制,start slave是报错:ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log
原因:之前做过主从复制
解决办法:
mysql> stop slave;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> reset slave;
Query OK, 0 rows affected (0.00 sec)
mysql> CHANGE MASTER TO
-> MASTER_HOST='192.168.122.10',
-> MASTER_PORT=3306,
-> MASTER_USER='repl',
-> MASTER_PASSWORD='repl',
-> MASTER_LOG_FILE='mysql-bin.000015',
-> MASTER_LOG_POS=192;
Query OK, 0 rows affected (0.14 sec)
mysql> start slave;
Query OK, 0 rows affected (0.07 sec)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30373263/viewspace-2121795/,如需转载,请注明出处,否则将追究法律责任。