From bc44e238b1a729b2d949a14ebb4ec06508010412 Mon Sep 17 00:00:00 2001 From: micah Date: Tue, 3 Jan 2006 16:09:29 +0000 Subject: [PATCH] Fixed mysql no user defaults file handling git-svn-id: http://code.autistici.org/svn/backupninja/trunk@305 758a04ac-41e6-0310-8a23-8373a73cc35d --- ChangeLog | 3 +++ handlers/mysql | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4df4f4a..5b0bb6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ version 0.9.3 -- unreleased . added (commented out) the various default paths to programs such as PGSQLDUMP, so that users can figure out more easily they can customize them + handler changes + mysql: + . fixed no user defaults file processing version 0.9.2 -- December 29, 2005 backupninja changes diff --git a/handlers/mysql b/handlers/mysql index 7ca9ab6..d317930 100644 --- a/handlers/mysql +++ b/handlers/mysql @@ -139,15 +139,12 @@ EOF else defaultsfile="--defaults-file=$mycnf" fi - -# if user is set, don't use $mycnf -elif [ "$userset" == "false" ]; then - defaultsfile="--defaults-file=$configfile" fi +# if a user is not set, use $confgfile, otherwise use $mycnf if [ "$user" == "" ]; then - userset=false; user=root; + defaultsfile="--defaults-file=$configfile" else userset=true; if [ $usevserver ] @@ -238,6 +235,7 @@ then then if [ $usevserver ] 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` if [ $? -ne 0 ] then -- 2.30.2