cms9651 — 2011-02-16T08:51:09-05:00 — #1
I need repair all mysql tables of database db_test (and check and optimize them) in one command and I try this:
CHECK table db_test._temp_tbl;
REPAIR table db_test._temp_tbl;
OPTIMIZE table db_test._temp_tbl;
CHECK tables db_test.*;
REPAIR tables db_test.*;
OPTIMIZE tables db_test.*;
---Not working: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*' at line 1
CHECK all tables db_test;
REPAIR all tables db_test;
OPTIMIZE all tables db_test;
---Not working: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'all tables db_test' at line 1
Can you help me?
r937 — 2011-02-16T09:39:22-05:00 — #2
why do you need to do this to all your tables?
why in one command?
cms9651 — 2011-02-16T09:52:26-05:00 — #3
Because some tables crashed...
Just an idea, if you have other solution it's ok...
r937 — 2011-02-16T10:08:01-05:00 — #4
then wouldn't it make sense to repair only those tables?
if you're going to invest effort, my advice is to apply it to finding out ~why~ some tables crashed, and fix whatever is causing it
cms9651 — 2011-02-16T12:21:20-05:00 — #5
I understand your suggestion, but I have problem: I am not a database db_test administrator and I'm not a writer tables.
When error web I found the problem with tables crash.
Only option is to work with server-language and SQL try to repair tables.