From 838dbe4dc474dd28f06a8e225c87173d78b3515b Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Tue, 15 Aug 2017 22:32:01 +0200 Subject: [PATCH] Allow remote connection to mariadb --- .docker/init.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.docker/init.sh b/.docker/init.sh index fe02c0c..12f283d 100644 --- a/.docker/init.sh +++ b/.docker/init.sh @@ -15,6 +15,8 @@ mysqladmin -u root password "${DB_ROOT_PASS}" mysql -u root -p${DB_ROOT_PASS} < /var/www/html/scripts/ulogger.sql mysql -u root -p${DB_ROOT_PASS} -e "CREATE USER 'ulogger'@'localhost' IDENTIFIED BY '${DB_USER_PASS}'" mysql -u root -p${DB_ROOT_PASS} -e "GRANT ALL PRIVILEGES ON ulogger.* TO 'ulogger'@'localhost'" +mysql -u root -p${DB_ROOT_PASS} -e "CREATE USER 'ulogger'@'%' IDENTIFIED BY '${DB_USER_PASS}'" +mysql -u root -p${DB_ROOT_PASS} -e "GRANT ALL PRIVILEGES ON ulogger.* TO 'ulogger'@'%'" mysql -u root -p${DB_ROOT_PASS} -e "INSERT INTO users (login, password) VALUES ('admin', '\$2y\$10\$7OvZrKgonVZM9lkzrTbiou.CVhO3HjPk5y0W9L68fVwPs/osBRIMq')" ulogger mysqladmin -u root -p${DB_ROOT_PASS} shutdown