Skip to content

Commit

Permalink
set utf8mb4 for mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
ryotsun committed Dec 24, 2018
1 parent 4ddaaa7 commit 4b269c2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:

mysql:
container_name: mysql
image: mysql:5.7.21
build: ./mysql
ports:
- "3306:3306"
environment:
Expand Down
2 changes: 2 additions & 0 deletions mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM mysql:5.7.21
COPY ./my.cnf /etc/mysql/conf.d/
9 changes: 9 additions & 0 deletions mysql/my.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[mysql]
default-character-set=utf8mb4

[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_bin

[client]
default-character-set=utf8mb4

0 comments on commit 4b269c2

Please sign in to comment.