Skip to content

Commit de8401d

Browse files
committedSep 9, 2016
Merge branch 'tanis2000-feature/osx-permissions'
2 parents c0b8987 + ad77222 commit de8401d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed
 

‎run.sh

+6-7
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ VOLUME_HOME="/var/lib/mysql"
44

55
# Tweaks to give Apache/PHP write permissions to the app
66
chown -R mysql:staff /var/lib/mysql
7-
chown -R mysql:staff /var/run/mysqld
87
chmod -R 770 /var/lib/mysql
9-
chmod -R 770 /var/run/mysqld
108

119
if [ -n "$VAGRANT_OSX_MODE" ];then
1210
usermod -u $DOCKER_USER_ID mysql
@@ -16,21 +14,22 @@ fi
1614

1715
# Tweaks to give MySQL write permissions to the app
1816
chmod -R 770 /var/lib/mysql
19-
chmod -R 770 /var/run/mysqld
2017
chown -R mysql:staff /var/lib/mysql
21-
chown -R mysql:staff /var/run/mysqld
2218

23-
sed -i "s/bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
24-
sed -i "s/user.*/user = mysql/" /etc/mysql/my.cnf
19+
sed -i "s/bind-address.*/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf
20+
sed -i "s/user.*/user = mysql/" /etc/mysql/mysql.conf.d/mysqld.cnf
2521

2622
if [[ ! -d $VOLUME_HOME/mysql ]]; then
2723
echo "=> An empty or uninitialized MySQL volume is detected in $VOLUME_HOME"
2824
echo "=> Installing MySQL ..."
29-
mysql_install_db > /dev/null 2>&1
25+
mysqld --initialize-insecure > /dev/null 2>&1
3026
echo "=> Done!"
3127
/create_mysql_users.sh
3228
else
3329
echo "=> Using an existing volume of MySQL"
3430
fi
3531

32+
chown -R mysql:staff /var/run/mysqld
33+
chmod -R 770 /var/run/mysqld
34+
3635
exec supervisord -n

0 commit comments

Comments
 (0)
Please sign in to comment.