Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Repair all tables in one go

Tags:

sql

mysql

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?

like image 386
AMD Avatar asked Jan 03 '11 07:01

AMD


People also ask

How do I run Mysqlcheck in Windows?

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.

What is Mysqlcheck command?

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.

How can we repair a MySQL table?

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.


1 Answers

from command line you can use:

mysqlcheck -A --auto-repair 

http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html

like image 116
Gu1234 Avatar answered Sep 21 '22 13:09

Gu1234