aboutsummaryrefslogtreecommitdiffstats
path: root/tests/travis
diff options
context:
space:
mode:
Diffstat (limited to 'tests/travis')
-rwxr-xr-xtests/travis/prepare_mysql.sh4
-rwxr-xr-xtests/travis/prepare_pgsql.sh9
2 files changed, 9 insertions, 4 deletions
diff --git a/tests/travis/prepare_mysql.sh b/tests/travis/prepare_mysql.sh
index 095ad7e25..9fd79c1ab 100755
--- a/tests/travis/prepare_mysql.sh
+++ b/tests/travis/prepare_mysql.sh
@@ -42,8 +42,8 @@ mysql $PROTO -e "SELECT @@sql_mode;"
# Create Hubzilla database
mysql $PROTO -u root -e "CREATE DATABASE IF NOT EXISTS hubzilla;";
-mysql $PROTO -u root -e "CREATE USER 'hubzilla'@'localhost' IDENTIFIED BY 'hubzilla';"
-mysql $PROTO -u root -e "GRANT ALL ON hubzilla.* TO 'hubzilla'@'localhost';"
+mysql $PROTO -u root -e "CREATE USER 'hubzilla'@'%' IDENTIFIED BY 'hubzilla';"
+mysql $PROTO -u root -e "GRANT ALL ON hubzilla.* TO 'hubzilla'@'%';"
# Import table structure
mysql $PROTO -u root hubzilla < ./install/schema_mysql.sql
diff --git a/tests/travis/prepare_pgsql.sh b/tests/travis/prepare_pgsql.sh
index 63c7388cb..3c38ef60c 100755
--- a/tests/travis/prepare_pgsql.sh
+++ b/tests/travis/prepare_pgsql.sh
@@ -34,10 +34,15 @@ psql -U postgres -c "SELECT VERSION();"
# Create Hubzilla database
psql -U postgres -c "DROP DATABASE IF EXISTS hubzilla;"
-psql -U postgres -c "CREATE DATABASE hubzilla;"
+psql -U postgres -v ON_ERROR_STOP=1 <<-EOSQL
+ CREATE USER hubzilla WITH PASSWORD 'hubzilla';
+ CREATE DATABASE hubzilla;
+ ALTER DATABASE hubzilla OWNER TO hubzilla;
+ GRANT ALL PRIVILEGES ON DATABASE hubzilla TO hubzilla;
+EOSQL
# Import table structure
-psql -U postgres -v ON_ERROR_STOP=1 hubzilla < ./install/schema_postgres.sql
+psql -U hubzilla -v ON_ERROR_STOP=1 hubzilla < ./install/schema_postgres.sql
# Show databases and tables
psql -U postgres -l