Skip to content

fix_mysql #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ RUN apt-get install -y sqlite3 libsqlite3-dev
RUN echo mysql-server mysql-server/root_password password $DB_PASS | debconf-set-selections;\
echo mysql-server mysql-server/root_password_again password $DB_PASS | debconf-set-selections;\
apt-get install -y mysql-server && \
echo "default_password_lifetime = 0" >> /etc/mysql/my.cnf && \
sed -i '/^bind-address/s/bind-address.*=.*/bind-address = 0.0.0.0/' /etc/mysql/my.cnf
RUN /usr/sbin/mysqld & \
echo "default_password_lifetime = 0" >> /etc/mysql/mysql.conf.d/mysqld.cnf && \
sed -i '/^bind-address/s/bind-address.*=.*/bind-address = 0.0.0.0/' /etc/mysql/mysql.conf.d/mysqld.cnf
RUN /etc/init.d/mysql start & \
sleep 10s && \
echo "GRANT ALL ON *.* TO root@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION; CREATE USER 'homestead'@'0.0.0.0' IDENTIFIED BY 'secret'; GRANT ALL ON *.* TO 'homestead'@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION; GRANT ALL ON *.* TO 'homestead'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION; FLUSH PRIVILEGES; CREATE DATABASE homestead;" | mysql
VOLUME ["/var/lib/mysql"]
Expand Down
6 changes: 4 additions & 2 deletions supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ stderr_logfile_maxbytes=0
stdout_events_enabled=true
stderr_events_enabled=true

[program:mysql]
command=/usr/bin/pidproxy /var/run/mysqld/mysqld.pid /usr/sbin/mysqld
[program:mysqld]
command=/usr/bin/pidproxy /var/run/mysqld/mysqld.pid /usr/bin/mysqld_safe --pid-file=/var/run/mysqld/mysqld.pid
autostart=true
autorestart=true
user=root

[program:redis]
command=/usr/bin/redis-server
Expand Down