mysql 新建外网用户 和只读用户

全权限用户

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

show grants for 'root'@'%';

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

只读用户

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

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

show grants for 'foo'@'%';

删除权限

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

猜你喜欢

转载自www.cnblogs.com/forthelichking/p/12449558.html
今日推荐