In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "how Mysql8 imports data into Mysql5.7". The editor shows you the operation process through an actual case. The operation method is simple and fast, and it is practical. I hope this article "how to import data into Mysql5.7 by Mysql8" can help you solve the problem.
Order
The default character set of Mysql8 is utf8mb4, and the collation is utf8mb4_0900_ai_ci. When we have a need to import Mysql8 data into Mysql5.7, there will be a collation that Mysql5.7 does not support utf8mb4_0900_ai_ci, so we can solve it in the following 2 ways.
Modify the character set and collation of xx.sql files
You can export Mysql8 data as sql scripts, and then fully replace character sets and collations through the editor. This approach is suitable for unsure which version of Mysql to import and can be modified as needed.
Directly modify the character set and collation of databases and tables
In our development phase, we may use the Mysql8 database, but when we are really online, we will provide other versions of the Mysql database. In order to avoid the mismatch between the character set and collation, we can make the character set and collation of the Mysql8 database compatible with the database version of the production environment.
Modify the database character set and collation-database_name = your library name ALTER DATABASE `database_ name` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci; modify the table character set and collation-database_name = your library name SELECT concat ("ALTER TABLE `", TABLE_NAME, "`collation") AS `target`from information_schema.TABLES WHERE table_schema = "databse_name"
After executing the above SQL, you will get the SQL that modifies the character set and collation of the table, which we can copy and execute.
Import MySQL8.0 to MySQL5.7 through Navicat
Open Navicat, select the database, and click tools-data transfer
Click the file to select the version you want to export
Open .sql file
Utf8mb4 replaced by utf8utf8mb4_0900_ai_ci replaced by utf8_general_ciutf8_croatian_ci replaced by utf8_general_ciutf8mb4_general_ci replaced by utf8_general_ci on "how Mysql8 imports data into Mysql5.7" content here, thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.