In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you the solution of garbled code when MYSQL imports data. I hope you will gain a lot after reading this article. Let's discuss it together.
MYSQL import data when there are garbled solutions: 1, by modifying the mysql installation file [my.ini] parameters to solve the garbled problem; 2, the command line to import garbled solution; 3, directly paste the code in the sql file; 4, with notepad or other text tools to change the coding format of the SQL file.
Solution to garbled code when MYSQL imports data:
First of all, create a new database with the same name in the operation tool of mysql. When coding the utf-8 new database, you must pay attention to generating the same coding form as the original database.
Method 1: solve the garbled code problem by modifying the parameter-default-character-set = utf8 in my.ini in the mysql installation file
[mysql] default-character-set=utf8
Method 2: import garbled solution on the command line
1 、 use database_name
2. Set names utf8; (or other required coding)
3. Source example.sql (the path where sql files are stored)
Method 3: paste the code in the sql file directly (recommended, that's how I implemented it)
1. Open the SQLyog client software
2. Navigate to the SQL editor, and then use notepad to open the SQL file you just exported
3. Copy all the SQL statements in the file to the SQL editor and execute the SQL code
Method 4: use notepad or other text tools to change the encoding format of the SQL file (if method 3 doesn't work, try method 4)
1. Use notepad (or UE) to open the exported SQL file
2. Save this file-- Open the Save as dialog box and select the encoding format as UNICODE encoding in the dialog box.
3. Save the file, then CTRL+A, select all
4. Copy the SQL statement into the "SQL Encoder" in SQLyog, and execute the SQL statement again
5. Refresh the database after the execution is completed
After reading this article, I believe you have a certain understanding of the solution of garbled code when MYSQL imports data. If you want to know more about it, welcome to follow the industry information channel. Thank you for your reading!
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.