Skip to content

Commit

Permalink
chore: 테스트 서버 mysql 설치 스크립트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
5uhwann committed Jul 9, 2024
1 parent eb930c2 commit bb3c485
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions .ebextensions/install_mysql.config
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
packages:
yum:
mysql-server: []
mysql: []

commands:
01_start_mysql:
command: "service mysqld start"

02_create_database:
command: "mysql -e 'CREATE DATABASE IF NOT EXISTS ddingdong_test;'"
03_create_user:
command: "mysql -e \"CREATE USER IF NOT EXISTS 'myuser'@'localhost' IDENTIFIED BY 'ddingdong';\""
04_grant_privileges:
command: "mysql -e \"GRANT ALL PRIVILEGES ON myapp.* TO 'myuser'@'localhost';\""
05_flush_privileges:
command: "mysql -e 'FLUSH PRIVILEGES;'"
command: "mysql -u root -e 'CREATE DATABASE IF NOT EXISTS ddingdong_test'"

services:
sysvinit:
mysqld:
enabled: true
ensureRunning: true
03_create_user:
command: "mysql -u root -e 'CREATE USER IF NOT EXISTS 'myuser'@'localhost' IDENTIFIED BY 'ddingdong'; GRANT ALL PRIVILEGES ON ddingdong_test.* TO 'myuser'@'localhost'; FLUSH PRIVILEGES;'"

0 comments on commit bb3c485

Please sign in to comment.