diff options
Diffstat (limited to 'handlers/mysql.in')
-rw-r--r-- | handlers/mysql.in | 2 |
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?" |