From: Matthijs Kooijman Date: Thu, 1 Jan 2009 19:46:01 +0000 (+0100) Subject: mysql: pass options consistently when listing databases. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja-vserver.git;a=commitdiff_plain;h=ceb5689d506197ffb2269c6c64a8ea0802d55aba mysql: pass options consistently when listing databases. r495 improved the database listing command, but only did this for the non-vserver case. This corrects that. --- diff --git a/handlers/mysql.in b/handlers/mysql.in index 39c1fb9..7ff194e 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -235,8 +235,8 @@ then then if [ $usevserver = yes ] then - debug 'echo show databases | $VSERVER $vsname exec su $user -c \"$MYSQL $defaultsfile\" | grep -v Database' - databases=`echo 'show databases' | $VSERVER $vsname exec su $user -c "$MYSQL $defaultsfile" | grep -v Database` + debug "$VSERVER $vsname exec su $user -c \"$MYSQL $defaultsfile -N -B -e 'show databases'\" | sed 's/|//g;/\+----/d'" + databases=`$VSERVER $vsname exec su $user -c "$MYSQL $defaultsfile -N -B -e 'show databases'" | sed 's/|//g;/\+----/d'` if [ $? -ne 0 ] then fatal "Authentication problem, maybe user/password is wrong or mysqld is not running?"