Parsing the MYSQL database to import the SQL file has a problem with garbled code

  • 2020-05-27 07:22:59
  • OfStack

When importing data, if the target database or table is of the UTF-8 character set, and there is Chinese in the imported SQL, it may appear messy code in the final result. At this point, just add the following content in the first line of the imported SQL file.
/*!40101 SET NAMES utf8 */;

Related articles: