From 596c12191319163807236568e0c1d682dbb8bfe6 Mon Sep 17 00:00:00 2001 From: "Fco. Javier Delgado del Hoyo" Date: Wed, 21 Mar 2018 13:08:51 +0100 Subject: [PATCH] use HOST and PORT for table lookup --- .travis.yml | 2 +- backup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a5f109..120a65f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ sudo: required -dist: xenial +dist: trusty language: bash before_script: diff --git a/backup.sh b/backup.sh index d2ca3dd..8de41a4 100755 --- a/backup.sh +++ b/backup.sh @@ -4,7 +4,7 @@ DATE=$(date +%Y%m%d%H%M) echo "=> Backup started at $DATE" -databases=$(mysql -u "$MYSQL_USER" -p"$MYSQL_PASS" -e "SHOW DATABASES;" | tr -d "| " | grep -v Database) +databases=$(mysql -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" -e "SHOW DATABASES;" | tr -d "| " | grep -v Database) for db in $databases do if [[ "$db" != "information_schema" ]] && [[ "$db" != "performance_schema" ]] && [[ "$db" != "mysql" ]] && [[ "$db" != _* ]]