ALTER DATABASE [
alter_specification: [DEFAULT] CHARACTER SET [=]
charset_name| [DEFAULT] COLLATE [=]
ALTER DATABASE enables you to
change the overall characteristics of a database. These
characteristics are stored in the
in the database directory. To use
DATABASE, you need the
ALTER privilege on the database.
CHARACTER SET clause changes the default
database character set. The
changes the default database collation. Section 9.1, “Character Set Support”,
discusses character set and collation names.
Beginning with MySQL 4.1.0, you can see what character sets and
collations are available using, respectively, the
SHOW CHARACTER SET and
SHOW COLLATION statements. See
Section 220.127.116.11, “
SHOW CHARACTER SET Syntax”, and
Section 18.104.22.168, “
SHOW COLLATION Syntax”, for more information.
ALTER DATABASE was added in MySQL
4.1.1. Beginning with MySQL 4.1.8, the database name can be
omitted, in which case the statement applies to the default