Linux 的 授权相关操作

// 授权 - 全部权限 - 授予用户 - user1- 本地和%外网可访问 - 并设密码 - 888

grant all privileges on database1.* to user1@localhost identified by ‘888′;
grant all privileges on database1.* to user1@'%' identified by ‘888′;


// 刷新权限 - 修改完权限之后需要刷新权限
flush privileges;

// 回收权限 - 从user1用户, 回收 数据库datavase2 的全部操作权限
revoke  all privileges on database2.*  from  user1;

你可能感兴趣的:(Linux)