r495 improved the database listing command, but only did this for the
non-vserver case. This corrects that.
then
if [ $usevserver = yes ]
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?"
if [ $? -ne 0 ]
then
fatal "Authentication problem, maybe user/password is wrong or mysqld is not running?"