TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
To migrate from MySQL 8.x to TiDB one might copy user accounts by running SHOW CREATE USER ... on MySQL and executing the result on TiDB. However this fails due to a mismatch in what MySQL produces and what TiDB accepts.
CREATE USER 'test1'@'%' IDENTIFIED WITH 'mysql_native_password' BY 'secret';
SHOW CREATE USER 'test1'@'%';
Then on TiDB execute what MySQL produced:
CREATE USER `test1`@`%` IDENTIFIED WITH 'mysql_native_password' AS '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT
2. What did you expect to see? (Required)
Query OK, 0 rows affected (0.00 sec)
3. What did you see instead (Required)
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 266 near "REQUIRE CURRENT DEFAULT"
Bug Report
To migrate from MySQL 8.x to TiDB one might copy user accounts by running
SHOW CREATE USER ...
on MySQL and executing the result on TiDB. However this fails due to a mismatch in what MySQL produces and what TiDB accepts.More info:
7968 (See the entry for 8.0.13)
1. Minimal reproduce step (Required)
On MySQL 8.0.37
Then on TiDB execute what MySQL produced:
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
And also today's
master
branch.