From a1c3fd5f0e53d48b883b3f921ee7b6a32962ee51 Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 12 Nov 2019 16:44:37 +0800 Subject: [PATCH] v2.1/*: delete "show create user" --- v2.1/TOC.md | 1 - v2.1/reference/sql/statements/alter-user.md | 25 +++++----- v2.1/reference/sql/statements/create-user.md | 1 - v2.1/reference/sql/statements/drop-user.md | 1 - v2.1/reference/sql/statements/set-password.md | 36 +++++++------- .../sql/statements/show-create-user.md | 49 ------------------- v2.1/reference/sql/statements/show-grants.md | 1 - 7 files changed, 30 insertions(+), 84 deletions(-) delete mode 100644 v2.1/reference/sql/statements/show-create-user.md diff --git a/v2.1/TOC.md b/v2.1/TOC.md index 4812f9665d88f..4bbd03a0d7e6a 100644 --- a/v2.1/TOC.md +++ b/v2.1/TOC.md @@ -253,7 +253,6 @@ - [`SHOW COLLATION`](/v2.1/reference/sql/statements/show-collation.md) - [`SHOW [FULL] COLUMNS FROM`](/v2.1/reference/sql/statements/show-columns-from.md) - [`SHOW CREATE TABLE`](/v2.1/reference/sql/statements/show-create-table.md) - - [`SHOW CREATE USER`](/v2.1/reference/sql/statements/show-create-user.md) - [`SHOW DATABASES`](/v2.1/reference/sql/statements/show-databases.md) - [`SHOW ENGINES`](/v2.1/reference/sql/statements/show-engines.md) - [`SHOW ERRORS`](/v2.1/reference/sql/statements/show-errors.md) diff --git a/v2.1/reference/sql/statements/alter-user.md b/v2.1/reference/sql/statements/alter-user.md index c21d6728f38c9..1d0d86ccc2d82 100644 --- a/v2.1/reference/sql/statements/alter-user.md +++ b/v2.1/reference/sql/statements/alter-user.md @@ -28,23 +28,23 @@ This statement changes an existing user inside the TiDB privilege system. In the mysql> CREATE USER 'newuser' IDENTIFIED BY 'newuserpassword'; Query OK, 1 row affected (0.01 sec) -mysql> SHOW CREATE USER 'newuser'; -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER for newuser@% | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER 'newuser'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*5806E04BBEE79E1899964C6A04D68BCA69B1A879' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +mysql> SELECT USER, HOST, PASSWORD FROM mysql.`user` WHERE USER = 'newuser'; ++---------+------+-------------------------------------------+ +| USER | HOST | PASSWORD | ++---------+------+-------------------------------------------+ +| newuser | % | *5806E04BBEE79E1899964C6A04D68BCA69B1A879 | ++---------+------+-------------------------------------------+ 1 row in set (0.00 sec) mysql> ALTER USER 'newuser' IDENTIFIED BY 'newnewpassword'; Query OK, 0 rows affected (0.02 sec) -mysql> SHOW CREATE USER 'newuser'; -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER for newuser@% | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER 'newuser'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*FB8A1EA1353E8775CA836233E367FBDFCB37BE73' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +mysql> SELECT USER, HOST, PASSWORD FROM mysql.`user` WHERE USER = 'newuser'; ++---------+------+-------------------------------------------+ +| USER | HOST | PASSWORD | ++---------+------+-------------------------------------------+ +| newuser | % | *FB8A1EA1353E8775CA836233E367FBDFCB37BE73 | ++---------+------+-------------------------------------------+ 1 row in set (0.00 sec) ``` @@ -57,4 +57,3 @@ mysql> SHOW CREATE USER 'newuser'; * [Security Compatibility with MySQL](/v2.1/reference/security/compatibility.md) * [CREATE USER](/v2.1/reference/sql/statements/create-user.md) * [DROP USER](/v2.1/reference/sql/statements/drop-user.md) -* [SHOW CREATE USER](/v2.1/reference/sql/statements/show-create-user.md) diff --git a/v2.1/reference/sql/statements/create-user.md b/v2.1/reference/sql/statements/create-user.md index e572bc0ba51de..c716da0c2bb36 100644 --- a/v2.1/reference/sql/statements/create-user.md +++ b/v2.1/reference/sql/statements/create-user.md @@ -52,6 +52,5 @@ Query OK, 1 row affected (0.02 sec) * [Security Compatibility with MySQL](/v2.1/reference/security/compatibility.md) * [DROP USER](/v2.1/reference/sql/statements/drop-user.md) -* [SHOW CREATE USER](/v2.1/reference/sql/statements/show-create-user.md) * [ALTER USER](/v2.1/reference/sql/statements/alter-user.md) * [Privilege Management](/v2.1/reference/security/privilege-system.md) diff --git a/v2.1/reference/sql/statements/drop-user.md b/v2.1/reference/sql/statements/drop-user.md index 101b62b29a24a..ddfed911fa0fd 100644 --- a/v2.1/reference/sql/statements/drop-user.md +++ b/v2.1/reference/sql/statements/drop-user.md @@ -68,5 +68,4 @@ ERROR 1141 (42000): There is no such grant defined for user 'newuser' on host '% * [CREATE USER](/v2.1/reference/sql/statements/create-user.md) * [ALTER USER](/v2.1/reference/sql/statements/alter-user.md) -* [SHOW CREATE USER](/v2.1/reference/sql/statements/show-create-user.md) * [Privilege Management](/v2.1/reference/security/privilege-system.md) diff --git a/v2.1/reference/sql/statements/set-password.md b/v2.1/reference/sql/statements/set-password.md index 33fa9af3983dd..e8cb59a026c70 100644 --- a/v2.1/reference/sql/statements/set-password.md +++ b/v2.1/reference/sql/statements/set-password.md @@ -23,34 +23,34 @@ Query OK, 0 rows affected (0.01 sec) mysql> CREATE USER 'newuser' IDENTIFIED BY 'test'; Query OK, 1 row affected (0.00 sec) -mysql> SHOW CREATE USER newuser; -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER for newuser@% | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER 'newuser'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +mysql> SELECT USER, HOST, PASSWORD FROM mysql.`user` WHERE USER = 'newuser'; ++---------+------+-------------------------------------------+ +| USER | HOST | PASSWORD | ++---------+------+-------------------------------------------+ +| newuser | % | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 | ++---------+------+-------------------------------------------+ 1 row in set (0.00 sec) mysql> SET PASSWORD FOR newuser = 'test'; Query OK, 0 rows affected (0.01 sec) -mysql> SHOW CREATE USER newuser; -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER for newuser@% | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER 'newuser'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +mysql> SELECT USER, HOST, PASSWORD FROM mysql.`user` WHERE USER = 'newuser'; ++---------+------+-------------------------------------------+ +| USER | HOST | PASSWORD | ++---------+------+-------------------------------------------+ +| newuser | % | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 | ++---------+------+-------------------------------------------+ 1 row in set (0.00 sec) mysql> SET PASSWORD FOR newuser = PASSWORD('test'); -- deprecated syntax from earlier MySQL releases Query OK, 0 rows affected (0.00 sec) -mysql> SHOW CREATE USER newuser; -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER for newuser@% | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER 'newuser'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK | -+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +mysql> SELECT USER, HOST, PASSWORD FROM mysql.`user` WHERE USER = 'newuser'; ++---------+------+-------------------------------------------+ +| USER | HOST | PASSWORD | ++---------+------+-------------------------------------------+ +| newuser | % | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 | ++---------+------+-------------------------------------------+ 1 row in set (0.00 sec) ``` diff --git a/v2.1/reference/sql/statements/show-create-user.md b/v2.1/reference/sql/statements/show-create-user.md deleted file mode 100644 index cdad4c0aaccad..0000000000000 --- a/v2.1/reference/sql/statements/show-create-user.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: SHOW CREATE USER | TiDB SQL Statement Reference -summary: An overview of the usage of SHOW CREATE USER for the TiDB database. -category: reference ---- - -# SHOW CREATE USER - -This statement shows how to re-create a user using the `CREATE USER` syntax. - -## Synopsis - -**ShowStmt:** - -![ShowStmt](/media/sqlgram-v2.1/ShowStmt.png) - -**Username:** - -![Username](/media/sqlgram-v2.1/Username.png) - -## Examples - -```sql -mysql> SHOW CREATE USER 'root'; -+--------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER for root@% | -+--------------------------------------------------------------------------------------------------------------------------+ -| CREATE USER 'root'@'%' IDENTIFIED WITH 'mysql_native_password' AS '' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK | -+--------------------------------------------------------------------------------------------------------------------------+ -1 row in set (0.00 sec) - -mysql> SHOW GRANTS FOR 'root'; -+-------------------------------------------+ -| Grants for root@% | -+-------------------------------------------+ -| GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' | -+-------------------------------------------+ -1 row in set (0.00 sec) -``` - -## MySQL compatibility - -* The output of `SHOW CREATE USER` is designed to match MySQL, but several of the `CREATE` options are not yet supported by TiDB. Not yet supported options will be parsed but ignored. See [security compatibility] for more details. - -## See also - -* [CREATE USER](/v2.1/reference/sql/statements/create-user.md) -* [SHOW GRANTS](/v2.1/reference/sql/statements/show-grants.md) -* [DROP USER](/v2.1/reference/sql/statements/drop-user.md) diff --git a/v2.1/reference/sql/statements/show-grants.md b/v2.1/reference/sql/statements/show-grants.md index 56c620fb10e4d..acd1f68da85ba 100644 --- a/v2.1/reference/sql/statements/show-grants.md +++ b/v2.1/reference/sql/statements/show-grants.md @@ -53,5 +53,4 @@ This statement is understood to be fully compatible with MySQL. Any compatibilit ## See also -* [SHOW CREATE USER](/v2.1/reference/sql/statements/show-create-user.md) * [GRANT](/v2.1/reference/sql/statements/grant-privileges.md)