FAT47の底辺インフラ議事録

学んだことのメモ帳です

mysqlでリストア後のレプリ再開でエラー

MySQL5.1で別サーバからdata_dirをもってきてレプリ再開した際に下記のエラー

mysql> start slave;
ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log

解決法
reset slaveで解決。
mysql> reset slave;
mysql> CHANGE MASTER TO
MASTER_HOST='ほげ',
MASTER_USER='repluser',
MASTER_PASSWORD='hogehoggehoge',
MASTER_LOG_FILE='mysql-bin.00xxxx',
MASTER_LOG_POS=6xxxxxxxxx;