add dbhost argument for status network setup
This commit is contained in:
parent
2187ec7056
commit
85b4c24188
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
# Base database name; full name will include nickname
|
# Base database name; full name will include nickname
|
||||||
|
|
||||||
|
export DBHOST=masterdb.example.net
|
||||||
export DBBASE=_example_net
|
export DBBASE=_example_net
|
||||||
export USERBASE=_example_net
|
export USERBASE=_example_net
|
||||||
export ADMIN=root
|
export ADMIN=root
|
||||||
|
@ -11,13 +11,13 @@ export username=$nickname$USERBASE
|
|||||||
|
|
||||||
# Create the db
|
# 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
|
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
|
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'@'localhost' IDENTIFIED BY '$password';
|
||||||
GRANT INSERT,SELECT,UPDATE,DELETE ON $database.* TO '$username'@'%' IDENTIFIED BY '$password';
|
GRANT INSERT,SELECT,UPDATE,DELETE ON $database.* TO '$username'@'%' IDENTIFIED BY '$password';
|
||||||
|
Loading…
Reference in New Issue
Block a user