搭建MySQL 8.0.18+MGR单主模式过程中,执行alter user 'repl'@'%' IDENTIFIED WITH caching_sha2_password;后提示“The MySQL server is running with the --super-read-only option so it cannot execute this statement”。
主库设置了只读模式,需要关闭只读模式的设置。
set global read_only=OFF;
alter user 'repl'@'%' IDENTIFIED WITH caching_sha2_password;