SHOW CREATE USER

    1. +--------------------------------------------------------------------------------------------------------------------------+
    2. | CREATE USER for root@% |
    3. | CREATE USER 'root'@'%' IDENTIFIED WITH 'mysql_native_password' AS '' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK |
    4. 1 row in set (0.00 sec)
    5. mysql> SHOW GRANTS FOR 'root';
    6. +-------------------------------------------+
    7. | GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' |
    8. +-------------------------------------------+
    9. 1 row in set (0.00 sec)
    • SHOW CREATE USER 的输出结果旨在匹配 MySQL,但 TiDB 尚不支持若干 CREATE 选项。尚未支持的选项在语句执行过程中会被解析但会被跳过执行。详情可参阅 [security compatibility]。