Default MySQL character set and collation

All versions of MySQL on (mt) Media Temple server are installed with the default character set ‘latin1′. The default collation for latin1 is ‘latin1_swedish_ci’ which in most cases does not cause any problems.

You can also change the character set and collation of a database by using the following MySQL command:

ALTER DATABASE db_name CHARACTER SET utf8 COLLATE utf8_general_ci;

You can also change the character set and collation of each table by using the following MySQL command:

ALTER TABLE TableName CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.