diff --git a/docker-compose.yml b/docker-compose.yml index e34bcbd20..310eda3fb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} volumes: - ./volumes/db:/var/lib/mysql + - ./mysql-conf.d:/etc/mysql/conf.d:ro phpmyadmin: image: phpmyadmin/phpmyadmin diff --git a/mysql-conf.d/utf8.cnf b/mysql-conf.d/utf8.cnf new file mode 100644 index 000000000..4c4dccb5b --- /dev/null +++ b/mysql-conf.d/utf8.cnf @@ -0,0 +1,10 @@ +[mysqld] + +# https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html +# says: "The character set named utf8 uses a maximum of three bytes +# per character and contains only BMP characters." +# If you want emoji (which your users most probably do), you need to +# use utf8mb4 instead. + +character-set-server=utf8mb4 +collation-server=utf8mb4_unicode_ci