About the MySQL character set problem (i)

Source: Internet
Author: User

MySQL Character set support (Character set supports) has two aspects: Character set (Character set) and Sort method (Collation). Support for character sets is refined to four levels: server, database, data table (table), and connection (connection).
MySQL default character set  MySQL Specifies the character set that can be refined to a database, a table, a column, and what character sets should be used. However, traditional programs do not use a complex configuration when creating databases and datasheets, and they use the default configuration, so where does the default configuration come from? (1) When compiling MySQL, a default character set is specified, and this character set is latin1; (2) When installing MySQL, you can specify a default character set in the configuration file (My.ini), if not specified, this value inherits from the compile time specified, (3) When starting mysqld, you can specify a default character set in the command line arguments, if not specified, This value inherits from the configuration in the configuration file, at which time the character_set_server is set to this default character set; (4) When a new database is created, the character set of the database is set to character_set_ by default unless explicitly specified. server; (5) When a database is selected, Character_set_database is set to the default character set for this database, and (6) When a table is created in this database, the default character set of the table is set to Character_set _database, which is the default character set for this database, (7) When a column is set in a table, the default character set of the column is the table's character set, unless explicitly specified, and a simple summary of all the columns of all the tables in the database will be used if they are not modified anywhere. Latin1 storage, but if we install MySQL, we will generally choose multi-lingual support, that is, the installer will automatically set the Default_character_set in the configuration file to UTF-8, which ensures that by default, All the columns of all the tables in the database are stored with UTF-8.

About the MySQL character set problem (i)

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.