现在的位置: 首页 > 综合 > 正文

mysql 用户权限管理

2018年04月25日 ⁄ 综合 ⁄ 共 305字 ⁄ 字号 评论关闭

创建用户:

1.

grant all on *.*  to 'yrt'@'localhost' identified by '123456'

2.

grant select,update on db.* to 'yrt'@'www.lulu.info' identified by '123456;

3.

grant select on * to 'yrt' identified by '123456';

查看用户权限

1.

show grants for 'yrt';

2.

show grants for 'yrt'@'localhost';

更改用户权限

1.

revoke select on db.* from yrt;

3.

revoke all on db.* from 'yrt'@'localhost';

抱歉!评论已关闭.