aboutsummaryrefslogtreecommitdiffstats
path: root/tests/travis/prepare_mysql.sh
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-08-16 10:32:35 +0200
committerMario Vavti <mario@mariovavti.com>2017-08-16 10:32:35 +0200
commit4a7384bc0ce1893a432bf4b7d67bca23796fe9db (patch)
tree5623c66a3f66445284529d6207e4ab4a2edb2810 /tests/travis/prepare_mysql.sh
parentc664a4bdcd1bd578f5ec3c2884f7c97e9f68d2d7 (diff)
parent90bc21f2d560d879d7eaf05a85af6d6dca53ebac (diff)
downloadvolse-hubzilla-2.6.tar.gz
volse-hubzilla-2.6.tar.bz2
volse-hubzilla-2.6.zip
Merge branch '2.6RC'2.6
Diffstat (limited to 'tests/travis/prepare_mysql.sh')
-rwxr-xr-xtests/travis/prepare_mysql.sh27
1 files changed, 16 insertions, 11 deletions
diff --git a/tests/travis/prepare_mysql.sh b/tests/travis/prepare_mysql.sh
index b3d84253c..095ad7e25 100755
--- a/tests/travis/prepare_mysql.sh
+++ b/tests/travis/prepare_mysql.sh
@@ -27,22 +27,27 @@ set -e
echo "Preparing for MySQL ..."
+if [[ "$MYSQL_VERSION" == "5.7" ]]; then
+ echo "Using MySQL 5.7 in Docker container, need to use TCP"
+ export PROTO="--protocol=TCP"
+fi
+
# Print out some MySQL information
mysql --version
-mysql -e "SELECT VERSION();"
-mysql -e "SHOW VARIABLES LIKE 'max_allowed_packet';"
-mysql -e "SHOW VARIABLES LIKE 'collation_%';"
-mysql -e "SHOW VARIABLES LIKE 'character_set%';"
-mysql -e "SELECT @@sql_mode;"
+mysql $PROTO -e "SELECT VERSION();"
+mysql $PROTO -e "SHOW VARIABLES LIKE 'max_allowed_packet';"
+mysql $PROTO -e "SHOW VARIABLES LIKE 'collation_%';"
+mysql $PROTO -e "SHOW VARIABLES LIKE 'character_set%';"
+mysql $PROTO -e "SELECT @@sql_mode;"
# Create Hubzilla database
-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';"
+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';"
# Import table structure
-mysql -u root hubzilla < ./install/schema_mysql.sql
+mysql $PROTO -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;"
+mysql $PROTO -u root -e "SHOW DATABASES;"
+mysql $PROTO -u root -e "USE hubzilla; SHOW TABLES;"