-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHOW CREATE USER syntax creates non-creatable users #9462
Labels
Comments
@lnhote are you interested in fixing? :-) |
Yes I will investigate and try to fix it. |
I think it is already been fixed. 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> CREATE USER 'root'@'%' IDENTIFIED WITH 'mysql_native_password' AS '' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK;
ERROR 1105 (HY000): Duplicate user
mysql> CREATE USER 'abc'@'%' IDENTIFIED WITH 'mysql_native_password' AS '' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK
-> ;
ERROR 1827 (HY000): The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function. but there is another issue that TiDB require the password generated by password() function. See #5948 |
Fixed by pingcap/parser#269. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Please answer these questions before submitting your issue. Thanks!
Ran
show create user
, and pasted the output back to the shell:The command
show create user
was added in #9240 , but unfortunately it creates a MySQL 5.7 compatible output which TiDB does not yet parse. See also: pingcap/parser#158 for matching parser bug.Pasting the output create user in MySQL 5.7 works fine:
tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: