From 19dbc0aaee22e66d40b83d01a0ad24b9b09cee92 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 20 Nov 2007 01:28:49 +0000 Subject: add patch from matthew palmer to enhance mysql database selection (Closes: #452039) --- handlers/mysql.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'handlers') 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?" -- cgit v1.2.3