MySQL Character Set Support

Server Character Set and Collation

character_set_server collation_server

The server character set and collation are used as default values if the database character set and collation are not specified in CREATE DATABASE statements. They have no other purpose.

Database Character Set and Collation

character_set_database and collation_database

The database character set and collation are used as default values for table definitions if the table character set and collation are not specified in CREATE TABLE statements. The database character set also is used by LOAD DATA INFILE. The character set and collation have no other purposes.

Table Character Set and Collation

The table character set and collation are used as default values for column definitions if the column character set and collation are not specified in individual column definitions.

Connection Character Sets and Collations

default-character-set= or SET NAMES

A SET NAMES 'charset_name' statement is equivalent to these three statements:
SET character_set_client = charset_name;
SET character_set_results = charset_name;
SET character_set_connection = charset_name;

The charset command issues a SET NAMES statement, and also changes the default character set that mysql uses when it reconnects after the connection has dropped.