From 3c09db7e103b2eafcb3ba0643a6da1e4873bfa50 Mon Sep 17 00:00:00 2001 From: lilin90 Date: Mon, 28 May 2018 11:53:26 +0800 Subject: [PATCH 1/2] sql: fix privilege errors Via: https://github.com/pingcap/docs-cn/pull/745 --- sql/privilege.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/privilege.md b/sql/privilege.md index ca24ca038f9ef..61101fa4da00e 100644 --- a/sql/privilege.md +++ b/sql/privilege.md @@ -208,13 +208,13 @@ 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`: From c3130e5d48b1f74e11216ff02e953fc7878478af Mon Sep 17 00:00:00 2001 From: lilin90 Date: Mon, 28 May 2018 14:03:34 +0800 Subject: [PATCH 2/2] sql: fix tables_priv --- sql/privilege.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/privilege.md b/sql/privilege.md index 61101fa4da00e..f0af2a3e27f0d 100644 --- a/sql/privilege.md +++ b/sql/privilege.md @@ -220,7 +220,7 @@ To be more precise, you can check the privilege information in the `Grant` table 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