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 563e6d4 commit eb930c2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .ebextensions/install_mysql.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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;'"

services:
sysvinit:
mysqld:
enabled: true
ensureRunning: true

0 comments on commit eb930c2

Please sign in to comment.