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
Fixes #235

* Not just utf8, as per
  https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html

Conflicts:
	docker-compose.yml (solved by concatenating both parent chunks)
  • Loading branch information
Dominique Quatravaux committed Feb 15, 2018
1 parent 6352e04 commit 4834e8d
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
- ./mysql-conf.d:/etc/mysql/conf.d:ro
restart: always

phpmyadmin:
Expand Down
10 changes: 10 additions & 0 deletions mysql-conf.d/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 4834e8d

Please sign in to comment.