Skip to content

Commit b8ce5a7

Browse files
author
Derek Bourgeois
committed
update mysql
attempt to create homestead database and give mysql root user remote access.
1 parent 32e7704 commit b8ce5a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ RUN echo mysql-server mysql-server/root_password password $DB_PASS | debconf-set
8989
echo mysql-server mysql-server/root_password_again password $DB_PASS | debconf-set-selections;\
9090
apt-get install -y mysql-server && \
9191
echo "default_password_lifetime = 0" >> /etc/mysql/my.cnf && \
92-
sed -i '/^bind-address/s/bind-address.*=.*/bind-address = 0.0.0.0/' /etc/mysql/my.cnf # && \
93-
# echo "CREATE DATABASE $DB_NAME;" | mysql -uroot -p$DB_PASS
92+
sed -i '/^bind-address/s/bind-address.*=.*/bind-address = 0.0.0.0/' /etc/mysql/my.cnf && \
93+
echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'" | ./bin/mysql -S ./mysql.sock -u root -psecret && \
94+
echo "CREATE DATABASE homestead;" | ./bin/mysql -S ./mysql.sock -u root -psecret
9495
VOLUME ["/var/lib/mysql"]
9596

9697
# install composer

0 commit comments

Comments
 (0)