diff --git a/bin/remote/setup_mysql.sh b/bin/remote/setup_mysql.sh index 80bbb9cade287ccae8cc88d56b9f5910c1f3dce8..72c911bc132c85168290a8d14d6fbb0ec0aa843a 100644 --- a/bin/remote/setup_mysql.sh +++ b/bin/remote/setup_mysql.sh @@ -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