Skip to content

Commit

Permalink
sql: fix privilege errors (#478)
Browse files Browse the repository at this point in the history
* sql: fix privilege errors

Via: pingcap/docs-cn#745

* sql: fix tables_priv
  • Loading branch information
lilin90 authored May 28, 2018
1 parent 1413694 commit 678dc00
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 678dc00

Please sign in to comment.