MySQL character set and collation Beijing MySQL DBA learning

Source: Internet
Author: User
Tags dba

MySQL provides a variety of character set and collation choices, where character set settings and data storage are related to the interaction of the client with the MySQL instance, and the collation and string comparison rules are related.

The settings of a character set can be in MySQL instance, database, table, column four levels. The MySQL setup character set supports three storage engines in InnoDB, MyISAM, and memory. There are two ways to view the current MySQL-supported character sets, one by viewing the Information_schema.character_set system table, and by command show character Set view each specified character set has one or more supported collations, which can be viewed in two ways, one for viewing the Information_schema.collations table and the other by the show Collation command.

Different character sets cannot have the same collation, because each character set will have a default collation.

Sorting rules:

Each character set can correspond to more than one collation, but each collation can only correspond to a single character set.

The collation commands are usually preceded by the names of the corresponding character sets and end with their own specific properties, such as collation Utf8_general_ci and Latin1_swedish_ci, respectively, that correspond to the collation of the UTF8 and latin1 character sets.

When a collation is specific to a language, the middle part is the name of the language, such as Utf8_turkish_ci and Utf8_hungarian_ci, which represent Turkish and Hungarian in the UTF8 character set.

The end character of a collation name indicates whether it is case sensitive, accent sensitive, and whether it is binary.

When _as or _ai are not specified in the collation name, the accent sensitivity is determined by the _ci or _cs, when the _ci is used, then the _ai is implied, and vice versa. For Unicode character sets, the corresponding collation may also contain the version number of the Unicode sorting algorithm.

Internet companies mostly use the database is MySQL, want to stand out from the many IT workers, need to have advanced technology, learning to add value is essential. The way of learning is your insistence. Old boy Education MySQL DBA course, after several update courses, to eliminate the theory, the whole enterprise real case combined with theoretical teaching, want to deep learning MySQL DBA knowledge, can pay attention to the old boy education.


MySQL character set and collation Beijing MySQL DBA learning

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.