MySQL5.1のレプリケーションが上手くいきません。
方法としてはvagrantでMySQLを2台立ち上げ、一方をmaster、もう一方をslaveとしました。
データは1台目をvagrant packageで抽出したため全く同じデータが入っております。
https://qiita.com/ksugawara61/items/fdd5ae9b78931540887f
に載っていることを一通りやりましたが、まず、slaveサーバで以下のコマンドを打つと
以下のエラーになりました。
mysql> change replication filter replicate_do_db = (example);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'replication filter replicate_do_db = (example)' at line 1
その後、以下のコマンドを打つと
mysql> show slave status\G
Slave_IO_Running: No
Slave_SQL_Running: Yes
Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
こうなってしまい、Slave_IO_RunningがNoになってしまいます。
/var/lib/mysql の master.infoを削除してみたりしましたが、
変わりませんでした。
上記のエラー内容はmasterとslaveでサーバIDが同じになっていると書いてありますが、
実際は別(ユニーク)にしています。。
何か解決方法を知っていたら教えて頂きたいです。
よろしくお願いいたします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。