Browse code

update to allow remote mysql connections

Anthony Young authored on 2011/09/15 01:40:58
Showing 2 changed files
... ...
@@ -122,7 +122,7 @@ EOF
122 122
 # Configure the runner
123 123
 RUN_SH=$ROOTFS/opt/run.sh
124 124
 cat > $RUN_SH <<EOF
125
-#!/bin/bash
125
+#!/usr/bin/env bash
126 126
 # Make sure dns is set up
127 127
 echo "nameserver $NAMESERVER" | sudo resolvconf -a eth0
128 128
 sleep 1
... ...
@@ -169,7 +169,7 @@ sudo sed -e "s,%DASH_DIR%,$DASH_DIR,g" -i /etc/apache2/sites-enabled/000-default
169 169
 sudo chown -R www-data:www-data $DASH_DIR
170 170
 
171 171
 # Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases:
172
-sudo mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' WITH GRANT OPTION;"
172
+sudo mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' identified by '$MYSQL_PASS';"
173 173
 
174 174
 # 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:
175 175
 sudo sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf