Skip to content
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

user password options not compatible with MySQL #53305

Open
dveeden opened this issue May 15, 2024 · 0 comments · May be fixed by #53306
Open

user password options not compatible with MySQL #53305

dveeden opened this issue May 15, 2024 · 0 comments · May be fixed by #53306
Assignees
Labels
affects-7.5 compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) severity/moderate sig/sql-infra SIG: SQL Infra type/bug This issue is a bug. type/compatibility

Comments

@dveeden
Copy link
Contributor

dveeden commented May 15, 2024

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:

1. Minimal reproduce step (Required)

On MySQL 8.0.37

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" 

4. What is your TiDB version? (Required)

mysql> SELECT TIDB_VERSION()\G
*************************** 1. row ***************************
TIDB_VERSION(): Release Version: v7.5.1
Edition: Community
Git Commit Hash: 7d16cc79e81bbf573124df3fd9351c26963f3e70
Git Branch: heads/refs/tags/v7.5.1
UTC Build Time: 2024-02-27 14:28:32
GoVersion: go1.21.6
Race Enabled: false
Check Table Before Drop: false
Store: tikv

And also today's master branch.

@dveeden dveeden added type/bug This issue is a bug. type/compatibility severity/minor compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) labels May 15, 2024
@dveeden dveeden self-assigned this May 15, 2024
@dveeden dveeden linked a pull request May 15, 2024 that will close this issue
13 tasks
@jebter jebter added the sig/sql-infra SIG: SQL Infra label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) severity/moderate sig/sql-infra SIG: SQL Infra type/bug This issue is a bug. type/compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants