SQL:授予/收回外部终端权限(for MySQL)

授予

grant all privileges on ‘*.*’ to ‘root@%’ identified by <pwd> [with grant option]

注:
# all privileges:所有权限,当然也可以授予指定的权限
# ‘*.*’:所有表的所有字段,具体格式为’<表名>.<字段名>’
# ‘root@%’:所有终端均可以用root用户登录主机,具体格式为’<登录主机用户名>@<终端ip>’
# <pwd>:指定登录主机用户名的密码
# with grant option:该终端可以授予其他终端所拥有的权限(慎用)

收回

revoke all privileges on ‘.’ from ‘root@%’ identified by <pwd> [with grant option]

猜你喜欢

转载自blog.csdn.net/chenmiaoqin950606/article/details/80262390
今日推荐