Change default collation for character set utf8mb4 to utf8mb4_unicode_ci
I don't think there is a way to change that DEFAULT
.
Anyway, it would be better to use utf8mb4_unicode_520_ci
, which is based on a later Unicode standard.
Just get into the habit of specifying CHARACTER SET
and COLLATION
on all connections and CREATE TABLEs
. MySQL and MariaDB are gradually changing from latin1_swedish_ci to utf8mb4_0900_ai_ci. MariaDB is not there yet, but I expect them to move soon. And "900" is probably not the last Unicode standard.
By explicitly specifying the charset and collation, you maintain control and consistency, even if it is an out-dated pair.
A compromise...
But charset and collation on CREATE DATABASE
. Then any tables built without specific settings will inherit those settings. And columns within that table will inherit from the table's settings.