aboutsummaryrefslogtreecommitdiff
path: root/handlers/mysql.in
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2007-11-20 01:28:49 +0000
committerMicah Anderson <micah@riseup.net>2007-11-20 01:28:49 +0000
commit19dbc0aaee22e66d40b83d01a0ad24b9b09cee92 (patch)
tree37a602b2304f736bd25ab27a088dd0b2fe6e2418 /handlers/mysql.in
parentea79f006da7c02794a36c1ad7e6ba29b2c4b5d12 (diff)
downloadbackupninja-19dbc0aaee22e66d40b83d01a0ad24b9b09cee92.tar.gz
backupninja-19dbc0aaee22e66d40b83d01a0ad24b9b09cee92.tar.bz2
add patch from matthew palmer to enhance mysql database selection (Closes: #452039)
Diffstat (limited to 'handlers/mysql.in')
-rw-r--r--handlers/mysql.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/handlers/mysql.in b/handlers/mysql.in
index 64b6f49..defb72a 100644
--- a/handlers/mysql.in
+++ b/handlers/mysql.in
@@ -238,7 +238,7 @@ then
fatal "Authentication problem, maybe user/password is wrong or mysqld is not running?"
fi
else
- databases=`echo 'show databases' | su $user -c "$MYSQL $defaultsfile" | grep -v Database`
+ databases=$(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?"