-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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;\"" |