CREATE USER 'monitor'@'%' IDENTIFIED BY '123456';
grant all privileges on *.* to 'monitor'@'%' with grant option;
flush privileges;

 

CREATE USER 'monitor'@'localhost' IDENTIFIED BY '123456';
grant all privileges on *.* to 'monitor'@'localhost' with grant option;
flush privileges;

 

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

ALTER USER 'monitor'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
ALTER USER 'monitor'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456‘;

ALTER USER 'rpl_user'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

flush privileges;
select user,host,plugin from user;