Solve Chinese garbled characters when Navicat runs .sql file

When I used navicat for the first time, when I ran .sql directly, garbled characters appeared in Chinese, as shown in the figure:


Later, I found out by checking the information, because there is a problem with the steps of running the .sql file by myself, and the encoding format is not set, so the correct encoding steps are described below:

Step 1: If you want to run the .sql file, you must select the database, because the table generated after .sql runs exists in the specified database. So right click on the database and click the "Run SQL File" option


Step 2: In the pop-up box, select the .sql file you want to open, and set the encoding format


Step 3: Click the "Start" button, the corresponding table will be generated in the current database, and you're done.



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324687808&siteId=291194637
Recommended