From fb111e6d958fdf56352db66e144134241abbacf8 Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Sun, 10 Dec 2017 01:29:49 +0100 Subject: :white_check_mark: Unit Test for dba_pdo driver class. --- tests/travis/prepare_mysql.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/travis/prepare_mysql.sh') 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 -- cgit v1.2.3 From 210c91398da573d3c44bd1ff5bee4c65128c8686 Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Mon, 29 Jan 2018 21:14:03 +0100 Subject: Make it little bit less likely to erase a real database. Changed the default PHPUnit database environment variables to make it little bit less likely to truncate accidently a real database. --- tests/travis/prepare_mysql.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/travis/prepare_mysql.sh') diff --git a/tests/travis/prepare_mysql.sh b/tests/travis/prepare_mysql.sh index 9fd79c1ab..5b1c96d78 100755 --- a/tests/travis/prepare_mysql.sh +++ b/tests/travis/prepare_mysql.sh @@ -25,7 +25,7 @@ # Exit if anything fails set -e -echo "Preparing for MySQL ..." +echo "Preparing for MySQL/MariaDB ..." if [[ "$MYSQL_VERSION" == "5.7" ]]; then echo "Using MySQL 5.7 in Docker container, need to use TCP" @@ -41,13 +41,13 @@ mysql $PROTO -e "SHOW VARIABLES LIKE 'character_set%';" 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'@'%' IDENTIFIED BY 'hubzilla';" -mysql $PROTO -u root -e "GRANT ALL ON hubzilla.* TO 'hubzilla'@'%';" +mysql $PROTO -u root -e "CREATE DATABASE IF NOT EXISTS travis_hubzilla;"; +mysql $PROTO -u root -e "CREATE USER 'travis_hz'@'%' IDENTIFIED BY 'hubzilla';" +mysql $PROTO -u root -e "GRANT ALL ON travis_hubzilla.* TO 'travis_hz'@'%';" # Import table structure -mysql $PROTO -u root hubzilla < ./install/schema_mysql.sql +mysql $PROTO -u root travis_hubzilla < ./install/schema_mysql.sql # Show databases and tables mysql $PROTO -u root -e "SHOW DATABASES;" -mysql $PROTO -u root -e "USE hubzilla; SHOW TABLES;" +mysql $PROTO -u root -e "USE travis_hubzilla; SHOW TABLES;" -- cgit v1.2.3