view_privileges.md 465 字节
Newer Older
M
Mars Liu 已提交
1 2 3 4
# 查看用户权限

Joe 想要查看 Fred 的 MySQL 账户 `'fred'@'%'` 的权限,他应该怎么做?

M
Mars Liu 已提交
5 6
点击进入[MySQL实战练习环境](https://mydev.csdn.net/product/pod/new?image=cimg-centos7-skilltreemysql&connect=auto&create=auto&utm_source=skill)

M
Mars Liu 已提交
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
## 答案

```mysql
show grants for fred;
```

## 选项

### A

```mysql
select grants from fred;
```

### B

```mysql
show privileges for fred;
```

### B

```mysql
show privileges from fred;
```