aboutsummaryrefslogtreecommitdiffstats
path: root/tests/travis/prepare_mysql.sh
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-05-05 23:13:54 +0200
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-05-06 01:07:15 +0200
commitf162508ad18b1fca9a5201f4956d52022bd941a8 (patch)
tree8849a1673599b2046056114f381ddc745c179e0d /tests/travis/prepare_mysql.sh
parent3ccefa20e8b10d0a507c6b002237664e721ca389 (diff)
downloadvolse-hubzilla-f162508ad18b1fca9a5201f4956d52022bd941a8.tar.gz
volse-hubzilla-f162508ad18b1fca9a5201f4956d52022bd941a8.tar.bz2
volse-hubzilla-f162508ad18b1fca9a5201f4956d52022bd941a8.zip
:construction_worker::white_check_mark::bug: Import table structure in TravisCI.
Fix a syntax error in schema_postres.sql which was discovered while working on this.
Diffstat (limited to 'tests/travis/prepare_mysql.sh')
-rwxr-xr-xtests/travis/prepare_mysql.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/travis/prepare_mysql.sh b/tests/travis/prepare_mysql.sh
index 92c720205..b3d84253c 100755
--- a/tests/travis/prepare_mysql.sh
+++ b/tests/travis/prepare_mysql.sh
@@ -36,4 +36,13 @@ mysql -e "SHOW VARIABLES LIKE 'character_set%';"
mysql -e "SELECT @@sql_mode;"
# Create Hubzilla database
-mysql -e "CREATE DATABASE IF NOT EXISTS hubzilla;" -uroot;
+mysql -u root -e "CREATE DATABASE IF NOT EXISTS hubzilla;";
+mysql -u root -e "CREATE USER 'hubzilla'@'localhost' IDENTIFIED BY 'hubzilla';"
+mysql -u root -e "GRANT ALL ON hubzilla.* TO 'hubzilla'@'localhost';"
+
+# Import table structure
+mysql -u root hubzilla < ./install/schema_mysql.sql
+
+# Show databases and tables
+mysql -u root -e "SHOW DATABASES;"
+mysql -u root -e "USE hubzilla; SHOW TABLES;"