Fix mysql command (solved)

Hello, is there please anyone who can advice how to fix mysql command here?

it returns errors once launched this bash script:
./mysql_optimize: line 10: read: ` ': not a valid identifier
./mysql_optimize: line 11: datalength: command not found

Thank you

It looks to me that you’re using the wrong type of quotes in your SQL statement, whereever you keep it.
I would assume that since you’re comparing PERCENT with a number, the result of a division, that shouldn’t need of quotes there. Same with ROWCOUNT.

My only doubt is if $PERCENT is the same variable than PERCENT but I never done this type of stuff so I trust the code is OK.

Thanks, i think i just found the cause. There is a block of words after line "mysql -NBe “SHOW TABLE STATUS;” $database " one have to place these all on one line and remove slashes at the end of lines.

Well done, then. Time to breath and do something nice now that all our problems are solved :wink:

Tomorrow will have another challenge :smiley:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.