12. Database systems¶
MySQL supports two UTF-8 variants: * utf8mb4: This is the full UTF-8 character set supported since MySQL 5.5 * utf8: Also known as utf8mb3. This only supports the Basic Multilingual Plane of Unicode 3.0 and doesn’t support 4-byte characters.
In MySQL a character set is used on a per-column basis. A default characater set for new columns is set on a table level. And the default for tables is set on a database level.
Unicode support is set on database level. There is a cluster level default.
To create a database with UTF-8 support: createdb -E utf8
To convert a non-unicode database to UTF-8 the recommended method is a dump/restore.