Skip to content

Commit

Permalink
build: Mysql Docker Image Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ohhonggi committed Jul 31, 2023
1 parent d0e2c96 commit e4196bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# FROM mysql/mysql-server:latest
FROM mysql:latest

# 권한 문제로 인한 sql 초기세팅 error 해결
CMD "chmod 755 ./mysql-init-file/init.sql"
6 changes: 6 additions & 0 deletions mysql/mysql-init-file/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
create user 'hangout'@'%' identified with mysql_native_password by 'password';
grant all privileges on *.* to 'hangout'@'%';
flush privileges;

CREATE DATABASE hangout DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
use hangout;

0 comments on commit e4196bc

Please sign in to comment.