use HOST and PORT for table lookup

This commit is contained in:
Fco. Javier Delgado del Hoyo 2018-03-21 13:08:51 +01:00
parent e98c5cdf2c
commit 596c121913
2 changed files with 2 additions and 2 deletions

View file

@ -1,5 +1,5 @@
sudo: required sudo: required
dist: xenial dist: trusty
language: bash language: bash
before_script: before_script:

View file

@ -4,7 +4,7 @@
DATE=$(date +%Y%m%d%H%M) DATE=$(date +%Y%m%d%H%M)
echo "=> Backup started at $DATE" 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 for db in $databases
do do
if [[ "$db" != "information_schema" ]] && [[ "$db" != "performance_schema" ]] && [[ "$db" != "mysql" ]] && [[ "$db" != _* ]] if [[ "$db" != "information_schema" ]] && [[ "$db" != "performance_schema" ]] && [[ "$db" != "mysql" ]] && [[ "$db" != _* ]]