Description:
run the follow command to do mysql upgrade
mysql_upgrade.exe --port=64031 --user=root --verbose --tmpdir="C:\Windows\Temp\test test2" --debug=d:t:O,"C:\Windows\Temp\mysql_upgrade.trace"
will get error:
Looking for 'mysql.exe' as: C:\Program Files\Quest Software\Toad Data Point 5.1\datahub\bin\mysql.exe
Looking for 'mysqlcheck.exe' as: C:\Program Files\Quest Software\Toad Data Point 5.1\datahub\bin\mysqlcheck.exe
The system cannot find the file specified.
The system cannot find the file specified.
Error: Failed while fetching Server version! Could be due to unauthorized access
.
FATAL ERROR: Upgrade failed
in the mysql_upgrade.trace I find command like
""C:\Program Files\Quest Software\Toad Data Point 5.1\datahub\bin\mysql.exe" "--no-defaults" "--protocol=TCP" "--port=64031" "--user=root" "--user=root" "--database=mysql" "--batch" "--skip-force" "--silent" < C:\Windows\Temp\test test2\sqlEEE7.tmp 2>&1 "
is it caused my the path of sql file not quoted?
More seirous issue is change environment variable TMP with path with whitespace will also lead to mysql upgrade failure without --tmpdir parameters. This blocked our autostart program which need to set TMP path for other parent process of mysql upgrade.
How to repeat:
run mysql_upgrade.exe with --tmpdir in a path with whitespace.