In MySQL, which collation should I choose?

bbtang picture bbtang · Aug 5, 2009 · Viewed 41.6k times · Source

When I create a new MySQL database through phpMyAdmin, I have the option to choose the collation (e.g.-default, armscii8, ascii, ... and UTF-8). The one I know is UTF-8, since I always see this in HTML source code. But what is the default collation? What are the differences between these choices, and which one should I use?

Answer

ZZ Coder picture ZZ Coder · Aug 5, 2009

Collation tells database how to perform string matching and sorting. It should match your charset.

If you use UTF-8, the collation should be utf8_general_ci. This will sort in Unicode order (case-insensitive) and it works for most languages. It also preserves ASCII and Latin1 order.

The default collation is normally latin1.