diff --git a/docker-compose.yml b/docker-compose.yml index 852124c..a24bf64 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,7 +36,7 @@ services: mysql: container_name: mysql - image: mysql:5.7.21 + build: ./mysql ports: - "3306:3306" environment: diff --git a/mysql/Dockerfile b/mysql/Dockerfile new file mode 100644 index 0000000..66da0cb --- /dev/null +++ b/mysql/Dockerfile @@ -0,0 +1,2 @@ +FROM mysql:5.7.21 +COPY ./my.cnf /etc/mysql/conf.d/ \ No newline at end of file diff --git a/mysql/my.cnf b/mysql/my.cnf new file mode 100644 index 0000000..a27f12c --- /dev/null +++ b/mysql/my.cnf @@ -0,0 +1,9 @@ +[mysql] +default-character-set=utf8mb4 + +[mysqld] +character-set-server=utf8mb4 +collation-server=utf8mb4_bin + +[client] +default-character-set=utf8mb4 \ No newline at end of file