SQL settings add PORT

This commit is contained in:
6543 2019-05-11 23:55:29 +02:00
parent 076c57bc3e
commit 645a61c521
2 changed files with 2 additions and 0 deletions

View File

@ -4,5 +4,6 @@ dbname="tt_test"
dbhost="localhost" dbhost="localhost"
dbuser="root" dbuser="root"
dbpwd="" dbpwd=""
dbport=


moviedir="/data/share/Filme" moviedir="/data/share/Filme"

View File

@ -38,6 +38,7 @@ function db_query() {
args+=" -h$dbhost" args+=" -h$dbhost"
args+=" -u$dbuser" args+=" -u$dbuser"
[ -n "$dbpwd" ] && args+=" -p$dbpwd" [ -n "$dbpwd" ] && args+=" -p$dbpwd"
[ -n "$dbport" ] && args+=" -P$dbport"
args+=" $dbname" args+=" $dbname"
[ $DEBUG == $TRUE ] && echo $@ >&2 [ $DEBUG == $TRUE ] && echo $@ >&2
echo $@ | mysql $args echo $@ | mysql $args