Any idea why I am seeing this error message? This script works fine on a ever so slightly older version of MySQL running on a different server with a similar config.
:: check/analyze/repair/optimize
@echo.
@echo Check Tables
%MYSQL_BIN%\mysqlcheck -u %MYSQL_USER% -p%MYSQL_PW% -v -1 -A -c
@echo.
@echo Repair Tables (medium)
%MYSQL_BIN%\mysqlcheck -u %MYSQL_USER% -p%MYSQL_PW% -v -1 -A -r -m
@echo.
@echo Analyze Tables
%MYSQL_BIN%\mysqlcheck -u %MYSQL_USER% -p%MYSQL_PW% -v -1 -A -a
@echo.
@echo Optimize Tables
%MYSQL_BIN%\mysqlcheck -u %MYSQL_USER% -p%MYSQL_PW% -v -1 -A -o
Error: C:...\MySQL Server 5.5\bin\mysqlcheck doesn't support multiple contradicting commands
At least one of your switches is likely now mutually exclusive to another in one or more calls to
mysqlcheck
.Look each of them up (
-v
,-1,
-A
,-c
,-r
,-m
,-a
,-o
), figure out each of them does, and figure out how to break them out into separate calls tomysqlcheck
, so they aren't contradicting each other.As a hypothetical example,
-v
combined with-r
might mean "set the clock back and set the clock forward" - an instruction that could arguably interpreted to be contradictory. If you want to do both operations, you must do them in two sequential calls tomysqlcheck
, in the order you which require them to run.As said before, the switches that you use are mutually exclusive: so you want to get rid of one option. Try this:
If I'm not mistaken, you get the same with just one command.