use different name for connection and database

This commit is contained in:
Evan Prodromou 2009-06-23 11:22:54 -07:00
parent e22f73c72b
commit a4402eedb3
2 changed files with 3 additions and 4 deletions

View File

@ -1,8 +1,7 @@
# CONFIGURATION FILE for setup_status_network.sh
# Base database name; full name will include nickname
export DBHOST=masterdb.example.net
export DBHOST=localhost
export DBHOSTNAME=masterdb.example.net
export DBBASE=_example_net
export USERBASE=_example_net
export ADMIN=root

View File

@ -22,7 +22,7 @@ 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';
INSERT INTO status_network (nickname, dbhost, dbuser, dbpass, dbname, sitename, created)
VALUES ('$nickname', '$DBHOST', '$username', '$password', '$database', '$sitename', now());
VALUES ('$nickname', '$DBHOSTNAME', '$username', '$password', '$database', '$sitename', now());
ENDOFCOMMANDS