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 bb3c485 commit 1f89393
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .ebextensions/install_mysql.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
packages:
yum:
mysql-server: []

commands:
01_start_mysql:
01_add_mysql_repo:
command: "wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm && rpm -Uvh mysql80-community-release-el7-3.noarch.rpm"

02_install_mysql:
command: "yum install -y mysql-community-server"

03_start_mysql:
command: "service mysqld start"

02_create_database:
04_create_database:
command: "mysql -u root -e 'CREATE DATABASE IF NOT EXISTS ddingdong_test'"

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;'"
05_create_user:
command: "mysql -u root -e \"CREATE USER IF NOT EXISTS 'myuser'@'localhost' IDENTIFIED BY 'mypassword'; GRANT ALL PRIVILEGES ON ddingdong_test.* TO 'myuser'@'localhost'; FLUSH PRIVILEGES;\""

0 comments on commit 1f89393

Please sign in to comment.