読者です 読者をやめる 読者になる 読者になる

O-Lab +Ossan Laboratory+

Ossanの研究所です。

MySQLでMHA使ってみようと思ったけども、エラーが。。。

駄文

よくわからねぇ。

  • bash-4.1$ masterha_check_repl --conf=/etc/app1.cnf

Wed Jul 23 14:45:24 2014 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Wed Jul 23 14:45:24 2014 - [info] Reading application default configurations from /etc/app1.cnf..
Wed Jul 23 14:45:24 2014 - [info] Reading server configurations from /etc/app1.cnf..
Wed Jul 23 14:45:24 2014 - [info] MHA::MasterMonitor version 0.55.
Wed Jul 23 14:45:24 2014 - [debug] Connecting to servers..
Wed Jul 23 14:45:24 2014 - [debug] Connected to: 192.168.1.15(192.168.1.15:3306), user=rep_user
Wed Jul 23 14:45:24 2014 - [debug] Connected to: 192.168.1.16(192.168.1.16:3306), user=rep_user
Wed Jul 23 14:45:24 2014 - [debug] Comparing MySQL versions..
Wed Jul 23 14:45:24 2014 - [debug] Comparing MySQL versions done.
Wed Jul 23 14:45:24 2014 - [debug] Connecting to servers done.
Wed Jul 23 14:45:24 2014 - [info] Dead Servers:
Wed Jul 23 14:45:24 2014 - [info] Alive Servers:
Wed Jul 23 14:45:24 2014 - [info] 192.168.1.15(192.168.1.15:3306)
Wed Jul 23 14:45:24 2014 - [info] 192.168.1.16(192.168.1.16:3306)
Wed Jul 23 14:45:24 2014 - [info] Alive Slaves:
Wed Jul 23 14:45:24 2014 - [info] 192.168.1.16(192.168.1.16:3306) Version=5.6.17-log (oldest major version between slaves) log-bin:enabled
Wed Jul 23 14:45:24 2014 - [debug] Relay log info repository: FILE
Wed Jul 23 14:45:24 2014 - [info] Replicating from 192.168.1.15(192.168.1.15:3306)
Wed Jul 23 14:45:24 2014 - [info] Primary candidate for the new Master (candidate_master is set)
Wed Jul 23 14:45:24 2014 - [info] Current Alive Master: 192.168.1.15(192.168.1.15:3306)
Wed Jul 23 14:45:24 2014 - [info] Checking slave configurations..
Wed Jul 23 14:45:24 2014 - [info] read_only=1 is not set on slave 192.168.1.16(192.168.1.16:3306).
Wed Jul 23 14:45:24 2014 - [warning] relay_log_purge=0 is not set on slave 192.168.1.16(192.168.1.16:3306).
Wed Jul 23 14:45:24 2014 - [info] Checking replication filtering settings..
Wed Jul 23 14:45:24 2014 - [info] binlog_do_db= , binlog_ignore_db=
Wed Jul 23 14:45:24 2014 - [info] Replication filtering check ok.
Wed Jul 23 14:45:24 2014 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln386] Error happend on checking configurations. Got MySQL error when checking replication privilege. 1142: SELECT command denied to user 'rep_user'@'192.168.1.15' for table 'user' query:SELECT Repl_slave_priv AS Value FROM mysql.user WHERE user = ?
at /usr/local/share/perl5/MHA/Server.pm line 381

Wed Jul 23 14:45:24 2014 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln482] Error happened on monitoring servers.
Wed Jul 23 14:45:24 2014 - [info] Got exit code 1 (Not master dead).


MySQL Replication Health is NOT OK!


なんぞ、これは。。。わからねぇ。
どこで質問したら良いんだろ、これ。



※追記。自己解決した。(2014/07/23)
単純にレプリケーション用として作成したユーザ「rep_user」に、
色々と権限がなかった。最終的に以下の権限を付与したら正常に動いた。

SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, FILE,
SUPER, REPLICATION SLAVE, REPLICATION CLIENT