add dbhost argument for status network setup

This commit is contained in:
Evan Prodromou 2009-06-17 16:30:16 -07:00
parent 2187ec7056
commit 85b4c24188
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@
# Base database name; full name will include nickname
export DBHOST=masterdb.example.net
export DBBASE=_example_net
export USERBASE=_example_net
export ADMIN=root

View File

@ -11,13 +11,13 @@ export username=$nickname$USERBASE
# Create the db
mysqladmin -u $ADMIN --password=$ADMINPASS create $database
mysqladmin -h $DBHOST -u $ADMIN --password=$ADMINPASS create $database
for f in laconica.sql sms_carrier.sql foreign_services.sql notice_source.sql; do
mysql -u $ADMIN --password=$ADMINPASS $database < ../db/$f;
mysql -h $DBHOST -u $ADMIN --password=$ADMINPASS $database < ../db/$f;
done
mysql -u $ADMIN --password=$ADMINPASS $SITEDB << ENDOFCOMMANDS
mysql -h $DBHOST -u $ADMIN --password=$ADMINPASS $SITEDB << ENDOFCOMMANDS
GRANT INSERT,SELECT,UPDATE,DELETE ON $database.* TO '$username'@'localhost' IDENTIFIED BY '$password';
GRANT INSERT,SELECT,UPDATE,DELETE ON $database.* TO '$username'@'%' IDENTIFIED BY '$password';