Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Commit

Permalink
Set default character set on server to utf8mb4
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominique Quatravaux committed Feb 15, 2018
1 parent 897366c commit 9b04f97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ./volumes/db:/var/lib/mysql
- ./etc/mysql/utf8.cnf:/etc/mysql/conf.d/utf8.cnf:ro

phpmyadmin:
image: phpmyadmin/phpmyadmin
Expand Down
10 changes: 10 additions & 0 deletions etc/mysql/utf8.cnf
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9b04f97

Please sign in to comment.