Oracle 5.0 Reference Manual page 791

Table of Contents

Advertisement

shell>
./configure --with-charset=latin1 \
--with-collation=latin1_german1_ci
Both
mysqld
program displays an error message and terminates.
The server character set and collation are used as default values if the database character set and
collation are not specified in
The current server character set and collation can be determined from the values of the
character_set_server
can be changed at runtime.
10.1.3.2. Database Character Set and Collation
Every database has a database character set and a database collation. The
ALTER DATABASE
collation:
CREATE DATABASE
[[DEFAULT] CHARACTER SET charset_name]
[[DEFAULT] COLLATE collation_name]
ALTER DATABASE
[[DEFAULT] CHARACTER SET charset_name]
[[DEFAULT] COLLATE collation_name]
The keyword
All database options are stored in a text file named
directory.
The
CHARACTER SET
character sets and collations on the same MySQL server.
Example:
CREATE DATABASE
MySQL chooses the database character set and database collation in the following manner:
• If both
CHARACTER SET X
• If
CHARACTER SET X
used. To see the default collation for each character set, use the
• If
COLLATE Y
collation
Y
• Otherwise, the server character set and server collation are used.
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
also is used by
The character set and collation for the default database can be determined from the values of
the
character_set_database
The server sets these variables whenever the default database changes. If there is no default
database, the variables have the same value as the corresponding server-level system variables,
character_set_server
10.1.3.3. Table Character Set and Collation
Every table has a table character set and a table collation. The
statements have optional clauses for specifying the table character set and collation:
Specifying Character Sets and Collations
and
verify that the character set/collation combination is valid. If not, each
configure
CREATE DATABASE
[443]
and
statements have optional clauses for specifying the database character set and
db_name
db_name
can be used instead of DATABASE.
SCHEMA
and
COLLATE
db_name
CHARACTER SET latin1 COLLATE latin1_swedish_ci;
and
COLLATE Y
is specified without COLLATE, character set
is specified without
are used.
INFILE. The character set and collation have no other purposes.
LOAD DATA
[442]
[443]
and
statements. They have no other purpose.
collation_server
db.opt
clauses make it possible to create databases with different
are specified, character set
SET, the character set associated with
CHARACTER
CREATE TABLE
and
collation_database
collation_server
771
[444]
system variables. These variables
CREATE DATABASE
that can be found in the database
and collation
X
and its default collation are
X
SHOW COLLATION
statements. The database character set
[444]
system variables.
[444].
and
CREATE TABLE
and
are used.
Y
statement.
and
Y
ALTER TABLE

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents