mysql command line import SQL script Chinese change question mark question

Source: Internet
Author: User
Tags mysql command line

have been using the tool to connect MySQL Although small problems continue to be harmless, recently done financial cloud projects, only through the server intranet access to the database, that is, only in Linux under the command line access, in the import of Chinese when the discovery has become a question mark, after the query data resolved, hereby record the idea.

1. Check whether the SQL script file is Unicode encoded, open to see if the script file will display correctly in Chinese.

2. Check that the database is built with UTF8 encoding.

3. Under the MySQL command line, perform the status check that the server characterset and client characterset encoding are consistent (I am the problem in this step), and if not, you can set it through set names UTF8.

4. Finally, the source command is imported, and the display is normal.

mysql command line import SQL script Chinese change question mark question

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.