Skip to content
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
23 changes: 15 additions & 8 deletions sql-statements/sql-statement-show-create-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ This statement shows how to re-create a user using the `CREATE USER` syntax.

## Synopsis

**ShowCreateUserStmt:**

![ShowCreateUserStmt](/media/sqlgram/ShowCreateUserStmt.png)

**Username:**

![Username](/media/sqlgram/Username.png)
```ebnf+diagram
ShowCreateUserStmt ::=
"SHOW" "CREATE" "USER" (Username ("@" Hostname)? | "CURRENT_USER" ( "(" ")" )? )
```

## Examples

Expand All @@ -39,7 +36,17 @@ mysql> SHOW GRANTS FOR 'root';

## 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.
<CustomContent platform="tidb">

* 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](/security-compatibility-with-mysql.md) for more details.

</CustomContent>

<CustomContent platform="tidb-cloud">

* 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](https://docs.pingcap.com/tidb/stable/security-compatibility-with-mysql/) for more details.

</CustomContent>

## See also

Expand Down