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: fix privilege errors #478

Merged
merged 2 commits 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 @@ -208,19 +208,19 @@ To be more precise, you can check the privilege information in the `Grant` table
1. Check if `test@%` has global `Insert` privilege:

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

2. If not, check if `test@%` has database-level `Insert` privilege at `db1`:

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

3. If the result is still empty, check whether `test@%` has table-level `Insert` privilege at `db1.t`:

```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';
```

### Implementation of the privilege system
Expand Down