update to allow remote mysql connections
This commit is contained in:
parent
92e31ab648
commit
10791a13fa
2 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ EOF
|
||||||
# Configure the runner
|
# Configure the runner
|
||||||
RUN_SH=$ROOTFS/opt/run.sh
|
RUN_SH=$ROOTFS/opt/run.sh
|
||||||
cat > $RUN_SH <<EOF
|
cat > $RUN_SH <<EOF
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
# Make sure dns is set up
|
# Make sure dns is set up
|
||||||
echo "nameserver $NAMESERVER" | sudo resolvconf -a eth0
|
echo "nameserver $NAMESERVER" | sudo resolvconf -a eth0
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
2
stack.sh
2
stack.sh
|
@ -169,7 +169,7 @@ sudo sed -e "s,%DASH_DIR%,$DASH_DIR,g" -i /etc/apache2/sites-enabled/000-default
|
||||||
sudo chown -R www-data:www-data $DASH_DIR
|
sudo chown -R www-data:www-data $DASH_DIR
|
||||||
|
|
||||||
# Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases:
|
# Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases:
|
||||||
sudo mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' WITH GRANT OPTION;"
|
sudo mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' identified by '$MYSQL_PASS';"
|
||||||
|
|
||||||
# Edit /etc/mysql/my.cnf to change ‘bind-address’ from localhost (127.0.0.1) to any (0.0.0.0) and restart the mysql service:
|
# Edit /etc/mysql/my.cnf to change ‘bind-address’ from localhost (127.0.0.1) to any (0.0.0.0) and restart the mysql service:
|
||||||
sudo sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
|
sudo sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
|
||||||
|
|
Loading…
Reference in a new issue