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 d7cc818 commit 7acdfa4
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .ebextensions/install_mysql.config
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
packages:
yum:
apt:
wget: []
epel-release: []

commands:
01_add_mysql_repo:
command: "wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm -O /tmp/mysql80-community-release-el7-3.noarch.rpm && rpm -Uvh /tmp/mysql80-community-release-el7-3.noarch.rpm"
01_update_apt_get:
command: "apt-get update -y"

02_install_mysql:
command: "yum clean all && yum -y install mysql-community-server"
02_add_mysql_repo:
command: "wget https://dev.mysql.com/get/mysql-apt-config_0.8.17-1_all.deb -O /tmp/mysql-apt-config_0.8.17-1_all.deb && dpkg -i /tmp/mysql-apt-config_0.8.17-1_all.deb"

03_start_mysql:
command: "service mysqld start"
03_install_mysql:
command: "DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server"

04_create_database:
04_start_mysql:
command: "service mysql start"

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

05_create_user:
06_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 7acdfa4

Please sign in to comment.