Querying the MySQL client character set

Source: Internet
Author: User
Tags mysql client set set

The character set of the MySQL client will typically follow the character set set by your system. For example, if your Linux system is set to a character set of GBK, the MySQL client's character set will also be GBK to view the client's character Set statement mysql> show variables like ' character_set% '; +--------------- -----------+---------------------------------------+| variable_name | Value |+--------------------------+---------------------------------------+|character_set_client | GBK (client character set) || character_set_connection | GBK (Connection character set)                             | | Character_set_database   | UTF8   (Database character set)                        | | Character_set_filesystem | Binary                                | | Character_set_results    | GBK   (return result character set)                    | | Character_set_server     | Latin1   (MySQL server character set)                          | | Character_set_system     | UTF8                                 &NBSP ;|| Character_sets_dir       | D:\mysql-5.6.23-win32\share\charsets\ |+--------------------------+---------------------------------------+8 rows in Set (0.00 sec) By default   character_set_client,Character_set_connection,character_set_results will be set according to the character sets of your system. This is because the MySQL client's character set and the server-side character set are different, resulting in garbled characters, the results of the above query will need to be set to the uniform character set. Generally, if you are a Linux system, you only need to set the Linux system character set to utf-8 those character sets will be unified.

Querying the MySQL client character set

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.