How to check all the tables in the database in one go?
Rather than typing the query check table ''tablename'';
for all the tables one by one.
Is there any simple command like check all
or anything like that?
To use the mysqlcheck table command and check tables, follow these steps: Step 1: As an administrator, change your directory to MySQL Data Directory. Step 2: Now type in the mysqlcheck command to check for an existing table in a database.
mysqlcheck uses the SQL statements CHECK TABLE , REPAIR TABLE , ANALYZE TABLE , and OPTIMIZE TABLE in a convenient way for the user. It determines which statements to use for the operation you want to perform, and then sends the statements to the server to be executed.
On the left, select Hosting Features > MySQL > PhpMyAdmin. Select the correct database from the list on the left. Select the check box corresponding to the corrupted table, and from the With selected list, click Repair table.
from command line you can use:
mysqlcheck -A --auto-repair
http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With