pre-cache git repos, add mysql perms
diff --git a/build_lxc.sh b/build_lxc.sh
index d43d8fd..940fcae 100755
--- a/build_lxc.sh
+++ b/build_lxc.sh
@@ -51,12 +51,19 @@
 
 # Warm the base image on first install
 CACHEDIR=/var/cache/lxc/natty/rootfs-amd64
-if [ ! -d $CACHEDIR ]; then
+if [  -d $CACHEDIR ]; then
     # trigger the initial debootstrap
     lxc-create -n $CONTAINER -t natty -f $LXC_CONF
     chroot $CACHEDIR apt-get update
     chroot $CACHEDIR apt-get install -y `cat apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server)"`
     chroot $CACHEDIR pip install `cat pips/*`
+    git clone https://github.com/cloudbuilders/nova.git $CACHEDIR/opt/nova
+    git clone https://github.com/cloudbuilders/openstackx.git $CACHEDIR/opt/openstackx
+    git clone https://github.com/cloudbuilders/noVNC.git $CACHEDIR/opt/noVNC
+    git clone https://github.com/cloudbuilders/openstack-dashboard.git $CACHEDIR/opt/dash
+    git clone https://github.com/cloudbuilders/python-novaclient.git $CACHEDIR/opt/python-novaclient
+    git clone https://github.com/cloudbuilders/keystone.git $CACHEDIR/opt/keystone
+    git clone https://github.com/cloudbuilders/glance.git $CACHEDIR/opt/glance
 fi
 
 # Destroy the old container
diff --git a/stack.sh b/stack.sh
index 88e779c..41bcdf2 100755
--- a/stack.sh
+++ b/stack.sh
@@ -60,7 +60,7 @@
 LIBVIRT_TYPE=${LIBVIRT_TYPE:-qemu}
 
 # Mysql connection info
-MYSQL_USER=${MYSQL_USER:-root}
+MYSQL_USER=${MYSQL_USER:-nova}
 MYSQL_PASS=${MYSQL_PASS:-nova}
 MYSQL_HOST=${MYSQL_HOST:-localhost}
 # don't specify /db in this string, so we can use it for multiple services
@@ -168,6 +168,9 @@
 # dashboard can run
 sudo chown -R www-data:www-data $DASH_DIR
 
+# 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;"
+
 # 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 service mysql restart