/go/repair runs mysqlcheck –repair on a database to fix corrupted tables. It: Run it when a site shows errors such as Table './db/table' is marked as crashed. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Repair every table in one database
/go/repair mydb
Arguments
| Argument | Effect |
|---|---|
<database> |
Repairs every table in that database, in the foreground. |
all |
Repairs every database on the server, in a detached screen session named RepairAll. See the warning below. |
| (none) | mysqlcheck prints its usage text and repairs nothing. |
[!WARNING]
As written,/go/repair allstarts thescreensession without passingallto it. The session then runs with no database name and repairs nothing. To repair all databases, start ascreensession yourself and run the command inside it (see Examples).
Examples
# Repair one database
/go/repair mydb
# Repair all databases: start a screen session, then run the command inside it
screen -S RepairAll
/go/repair all
# Detach with Ctrl+A then D, and reattach later with:
screen -r RepairAll
# List screen sessions
screen -ls
# Review the log of past runs
tail -n 20 /var/log/go/repair.log
Output
The command prints what mysqlcheck reports, one entry per table. The exact wording depends on your MariaDB version.
mydb.wp_posts OK
mydb.wp_options OK
| Result | Meaning |
|---|---|
OK |
The table is healthy, or was repaired. |
The storage engine for the table doesn't support repair |
The table uses a storage engine that cannot be repaired this way, such as InnoDB. |
| An error line | The table could not be repaired. |
With all, nothing is printed in your terminal. The work happens in the detached session.
See the full reference at /go/repair and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
