--- scripts/mysql_upgrade 2006-04-26 00:22:23.000000000 +0200 +++ /usr/bin/mysql_upgrade 2006-04-27 13:04:10.000000000 +0200 @@ -14,6 +14,7 @@ user=root +password='' case "$1" in --no-defaults|--defaults-file=*|--defaults-extra-file=*) @@ -36,6 +37,7 @@ case "$arg" in --basedir=*) MY_BASEDIR_VERSION=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; + --password=*) password=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --ldata=*|--data=*|--datadir=*) DATADIR=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --force) force=1 ;; --verbose) verbose=1 ;; @@ -49,6 +51,7 @@ fi ;; esac +echo "#42#DEBUG# arg=$arg artgs=$args user=$user password=$password" done } @@ -100,6 +103,7 @@ echo " --datadir Specifies the data directory" echo " --force Mysql_upgrade.info file will be ignored" echo " --user Username for server login if not current user" + echo " --password Password for server login if not empty" echo " --verbose Display more output about the process" echo "" @@ -185,7 +189,7 @@ # Run the upgrade # -check_args="--check-upgrade --all-databases --auto-repair --user=$user" +check_args="--check-upgrade --all-databases --auto-repair --user=$user --password=$password" if test $verbose = 1 then @@ -200,4 +204,4 @@ echo "5.0" > $CHECK_FILE fi -$bindir/mysql_fix_privilege_tables --silent --user=$user $args +$bindir/mysql_fix_privilege_tables --silent --user=$user --password=$password $args