Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 提个问题 我不小心把mysql的 mysql库导入到tidb了。现在建用户不正常
【TiDB Usage Environment】Production environment or Test environment or POC
【TiDB Version】Version 6.1
【Encountered Problem】
【Reproduction Path】What operations were performed that led to the problem
Imported MySQL table
【Problem Phenomenon and Impact】
MySQL [(none)]> GRANT USAGE ON . TO ‘dba_yearning’@‘172.%’ IDENTIFIED BY ‘uAqIxdJqeZekHl5Y4EZmsaAz32U=’ WITH GRANT OPTION;
ERROR 1364 (HY000): Field ‘ssl_cipher’ doesn’t have a default value
【Attachments】
Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.
The structures of the two tables are different, it will definitely report an error.
How about starting a test environment with tiup playground and importing a MySQL table schema to try it out?
It’s a hassle to rebuild the system again.
You moved the system tables over as well, right?
If testing, rebuilding once is more convenient.
I’m also puzzled as to how this MySQL table got in.
Hello, may I ask what tool was used for the import, and what were the commands or configuration files like? Please share them so we can see why the MySQL database was overwritten.
Use mysqldump to export the entire database data, then use mysql < all.sql to import it back in.
I feel that TiDB should come up with a solution to prevent writing to MySQL system tables.
In the future, I will be more careful. When not using DM for migration, there are still many things to pay attention to. A small mistake can lead to an accident.
This is expected behavior. It is recommended to use TiDB’s official tools for export and import, which come with a built-in system library filter.
Okay, I’ll try the official TiDB tools.
This topic was automatically closed 1 minute after the last reply. No new replies are allowed.