Home  >  Article  >  Database  >  What should I do if mysql imports txt garbled characters?

What should I do if mysql imports txt garbled characters?

藏色散人
藏色散人Original
2021-12-28 10:24:502615browse

Solution to mysql importing garbled txt: 1. Use Navicat Premium to connect to the database; 2. Modify the database format to utf8; 3. Re-import the txt file into the database.

What should I do if mysql imports txt garbled characters?

The operating environment of this article: Windows 7 system, Navicat Premium version 15, Dell G3 computer.

How to import garbled txt into mysql?

Solution to mysql importing garbled txt:

First of all, make sure that the txt file is saved in UTF8 format. You can open it here to check the content to confirm the format.

What should I do if mysql imports txt garbled characters?

Then use Navicat Premium to connect to the database and check that the data table is in UTF8 format.

What should I do if mysql imports txt garbled characters?

Then check the format of the database and make sure it is UTF8.

What should I do if mysql imports txt garbled characters?

#Continue to view the columns of the table in the database are also in UTF8 format.

What should I do if mysql imports txt garbled characters?

# Query the table data. First, the empty table does not have a piece of data.

What should I do if mysql imports txt garbled characters?

Import the prepared txt file into the database and check whether the data is garbled.

What should I do if mysql imports txt garbled characters?

# Query the database again to check the data just imported. There is no garbled code. OK means we have set it up successfully!

What should I do if mysql imports txt garbled characters?

The above is the detailed content of What should I do if mysql imports txt garbled characters?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:where is mysql.iniNext article:where is mysql.ini