@@ -4,9 +4,7 @@ VOLUME_HOME="/var/lib/mysql"
4
4
5
5
# Tweaks to give Apache/PHP write permissions to the app
6
6
chown -R mysql:staff /var/lib/mysql
7
- chown -R mysql:staff /var/run/mysqld
8
7
chmod -R 770 /var/lib/mysql
9
- chmod -R 770 /var/run/mysqld
10
8
11
9
if [ -n " $VAGRANT_OSX_MODE " ]; then
12
10
usermod -u $DOCKER_USER_ID mysql
16
14
17
15
# Tweaks to give MySQL write permissions to the app
18
16
chmod -R 770 /var/lib/mysql
19
- chmod -R 770 /var/run/mysqld
20
17
chown -R mysql:staff /var/lib/mysql
21
- chown -R mysql:staff /var/run/mysqld
22
18
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
25
21
26
22
if [[ ! -d $VOLUME_HOME /mysql ]]; then
27
23
echo " => An empty or uninitialized MySQL volume is detected in $VOLUME_HOME "
28
24
echo " => Installing MySQL ..."
29
- mysql_install_db > /dev/null 2>&1
25
+ mysqld --initialize-insecure > /dev/null 2>&1
30
26
echo " => Done!"
31
27
/create_mysql_users.sh
32
28
else
33
29
echo " => Using an existing volume of MySQL"
34
30
fi
35
31
32
+ chown -R mysql:staff /var/run/mysqld
33
+ chmod -R 770 /var/run/mysqld
34
+
36
35
exec supervisord -n
0 commit comments