Meanings of variables encoded in MySQL

Source: Internet
Author: User

Character_set_client, which is the character set that the user tells MySQL to query.
Character_set_connection. After MySQL receives the user query, it converts it to the character set character_set_connection according to character_set_client.

Character_set_results, MySQL converts the stored data to the character set in character_set_results and sends it to the user.

Character_set_clientThe encoding of the SQL statement is specified. If it is set to binary, MySQL will process it as binary. character_set_connection specifies the encoding used by MySQL to run the SQL statement, that is,ProgramThe SQL statement sent to MySQL is first converted from the encoding specified by character_set_client to the encoding specified by character_set_connection. If character_set_clien specifies binary, mySQL interprets the SQL statement according to the encoding specified by character_set_connection.

During SQL statement execution, for example, when a field is inserted into the database, the field also has encoding settings. If the encoding settings of the field are different from those specified by character_set_connection, mySQL converts the inserted data into the encoding set by the field. The execution process of condition judgment in SQL statements is similar to that in SQL insert statements.

After the SQL statement is executed, the data is converted from the encoding specified by the field to the encoding specified by character_set_results. If character_set_results = NULL, no conversion is performed, (Note that setting null here is not equal to not being set. MySQL inherits the global settings when no setting is set ),

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.