mysql new external users and a read-only user

Full user permissions

CREATE USER 'root'@'%' IDENTIFIED BY 'xxxx';

show grants for 'root'@'%';

GRANT all privileges ON *.* TO 'root'@'%';

 

Read-only users

CREATE USER 'foo'@'%' IDENTIFIED BY 'xxxx';

GRANT select ON *.* TO 'foo'@'%';

show grants for 'foo'@'%';

 

Delete permissions

REVOKE ALL ON mysql01.* FROM 'michael02'@'%';

Guess you like

Origin www.cnblogs.com/forthelichking/p/12449558.html