Home >Database >Mysql Tutorial >What should I do if mysql imports txt garbled characters?
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.
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.
Then use Navicat Premium to connect to the database and check that the data table is in UTF8 format.
Then check the format of the database and make sure it is UTF8.
#Continue to view the columns of the table in the database are also in UTF8 format.
# Query the table data. First, the empty table does not have a piece of data.
Import the prepared txt file into the database and check whether the data is garbled.
# Query the database again to check the data just imported. There is no garbled code. OK means we have set it up successfully!
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!