Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: modify some errors about privileges #745

Merged
merged 1 commit into from
May 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sql/privilege.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,19 @@ show grants for 'root'@'%';
先查看该用户是否拥有全局 Insert 权限:

```sql
select Insert from mysql.user where user='test' and host='%';
select Insert_priv from mysql.user where user='test' and host='%';
```

如果没有,再查看该用户是否拥有 `db1` 数据库级别的 Insert权限:

```sql
select Insert from mysql.db where user='test' and host='%';
select Insert_priv from mysql.db where user='test' and host='%';
```

如果仍然没有,则继续判断是否拥有 `db1.t` 这张表的 Insert 权限:

```sql
select tables_priv from mysql.tables_priv where user='test' and host='%' and db='db1';
select table_priv from mysql.tables_priv where user='test' and host='%' and db='db1';
```

### 权限系统的实现
Expand Down