Commit d195b5a5 authored by j38560's avatar j38560

Create MYSQL user for deployment.

parent ace41be0
......@@ -6,12 +6,14 @@ apt-get update
export DEBIAN_FRONTEND=noninteractive
echo "mysql-server mysql-server/root_password password " | debconf-set-selections
echo "mysql-server mysql-server/root_password_again password " | debconf-set-selections
apt-get install -y -q mysql-server
sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
service mysql stop
service mysql start
echo "mysql-server mysql-server/root_password_again password " | debconf-set-selections
apt-get install -y -q mysql-server
sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf
service mysql stop
service mysql start
mysql -u root -e "CREATE USER 'deployment'@'%' IDENTIFIED BY '';"
mysql -u root -e "GRANT ALL PRIVILEGES ON * . * TO 'deployment'@'%';"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment