Pre-General Availability Draft: 2017-05-23
- 126.96.36.199 Collation Naming Conventions
- 188.8.131.52 Server Character Set and Collation
- 184.108.40.206 Database Character Set and Collation
- 220.127.116.11 Table Character Set and Collation
- 18.104.22.168 Column Character Set and Collation
- 22.214.171.124 Character String Literal Character Set and Collation
- 126.96.36.199 The National Character Set
- 188.8.131.52 Character Set Introducers
- 184.108.40.206 Examples of Character Set and Collation Assignment
- 220.127.116.11 Compatibility with Other DBMSs
There are default settings for character sets and collations at four levels: server, database, table, and column. The description in the following sections may appear complex, but it has been found in practice that multiple-level defaulting leads to natural and obvious results.
CHARACTER SET is used in clauses that specify
a character set.
CHARSET can be used as a
Character set issues affect not only data storage, but also
communication between client programs and the MySQL server. If
you want the client program to communicate with the server using
a character set different from the default, you'll need to
indicate which one. For example, to use the
utf8mb4 Unicode character set, issue this
statement after connecting to the server:
SET NAMES 'utf8mb4';
For more information about character set-related issues in client/server communication, see Section 11.1.4, “Connection Character Sets and Collations”.