Description:
mysqlrpladmin refuses to run when it finds a GRANT for an unrelated user during switchover.
ERROR: Unable to parse grant statement GRANT REPLICATION SLAVE ON *.* TO 'SUSR_Repl_SSL'@'%' IDENTIFIED BY PASSWORD 'redacted' REQUIRE X509
The logs do not identify which server has the GRANT that it is complaining about.
mysqlrpladmin appears to be complaining about the the REQUIRE X509
How to repeat:
Add a replication user to the master that requires X509
GRANT REPLICATION SLAVE ON *.* TO 'SUSR_Repl_SSL'@'%' IDENTIFIED BY 'password' REQUIRE X509;
Execute mysqlrpladmin
$ mysqlrpladmin --verbose --demote-master --discover-slaves-login=.myrpladmin.cnf/[SUSR_rpladmin] --master=.myrpladmin.cnf/[lively-haze] --new-master=.myrpladmin.cnf[noisy-pond] --rpl-user=SUSR_Repl --log=mysqlrpladmin.log switchover
Get error
ERROR: Unable to parse grant statement GRANT REPLICATION SLAVE ON *.* TO 'SUSR_Repl_SSL'@'%' IDENTIFIED BY PASSWORD '*A6CD37844C838FC72EA6D957898712EF58FB36A5' REQUIRE X509
# Errors found. Switchover aborted.
Suggested fix:
1) Don't examine GRANTs for users unrelated to the task.
2) Understand REQUIRE X509 in GRANT
3) Update the logging to provide detail(s) about which server(s) have the reported problem(s).