
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-08-2013 05:42 PM
It's taking forever to repair the Database Tables, and I'm not certain the process continues after I'm timed out of the web interface. Is it possible to repair the database tables from the command line?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-08-2013 07:36 PM
You can use the mysqlcheck command to perform several operations including check, repair and/or optimize.
example:
mysqlcheck -u root -p --auto-repair --check --optimize --all-databases
http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-08-2013 07:36 PM
You can use the mysqlcheck command to perform several operations including check, repair and/or optimize.
example:
mysqlcheck -u root -p --auto-repair --check --optimize --all-databases
http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-11-2013 09:49 AM
Thanks Sonic84!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 04-11-2016 07:31 PM
How to auto repair all databases with mysqlcheck
$ mysqlcheck -u root --auto-repair --all-databases
--auto-repair If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found.
--all-databases Check all the databases. This is the same as --databases with all databases selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-24-2016 07:01 AM
Thought I'd post these commands here, in case anyone needs to first do a full backup of MySQL, then check and repair all databases.
First command does a full backup of MySQL, this includes all databases, all GRANTs, etc.
Second command outputs a log so you can peruse table maintenance success, since Command Prompt on Windows doesn't seem to let you scroll up through the whole enchilada output.
mysqldump -u root -p<password> --all-databases > database_backup.sql
mysqlcheck -u root -p<password> --auto-repair --check --all-databases > database_backup.txt
https://donmontalvo.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 08-29-2016 10:36 AM
removed -wrong posting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
You can easily repair a database table using the DRS Softech MySQL Database Repair Tool in just a few simple steps:
-
Download & Install the tool on your system.
-
Launch the software and select the corrupted MySQL database.
-
Click on Scan to analyze and repair the damaged tables.
-
Preview the recoverable data before saving.
-
Click on Save to restore the repaired tables.
