diff --git a/scripts/mysql.sh b/scripts/mysql.sh index 5bd02d92..755e5191 100644 --- a/scripts/mysql.sh +++ b/scripts/mysql.sh @@ -30,7 +30,11 @@ sudo apt-get install -qq $mysql_package if [ $3 == "true" ]; then # enable remote access # setting the mysql bind-address to allow connections from everywhere - sed -i "s/bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/my.cnf + if [ $2 == "5.6" ]; then + sed -i "s/bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf + else + sed -i "s/bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/my.cnf + fi # adding grant privileges to mysql root user from everywhere # thx to http://stackoverflow.com/questions/7528967/how-to-grant-mysql-privileges-in-a-bash-script for this