Read: How to actually, really use proper UTF-8 for everything
MySQL understands and uses character sets and collations when receiving, storing and sending data. In previous versions the default character set and collation were latin1
and latin1_swedish_ci
, but as of version 8.0 these defaults have been changed to the much more sane utf8mb4
and utf8mb4_0900_ci_ai
. It's a good time to go through exactly how these concepts work in MySQL and to make sure we're using the correct values everywhere.
This document assumes MySQL version 8.0 unless otherwise specified.