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

link|improve this question

feedback

migrated from stackoverflow.com Jul 17 '11 at 4:54

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

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 to mysqlcheck, 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 to mysqlcheck, in the order you which require them to run.

link|improve this answer
Thanks Mike! Explained perfectly. I'll have a crack at this tomorrow and let you know when it's fixed ;-D – Chris Jul 14 '11 at 18:51
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.