wp_options’ is marked as crashed and last (automatic?) repair failed

Today, when I accessed my website, it showed “database connection failed”. I opened the mysql log file /var/log/mariadb//mariadb.log and saw the following error:

wp_options’ is marked as crashed and last (automatic?) repair failed

I tried to repair the wp_options table:

and got the following error:

| domainhostseotool.wp_options | repair | error    | Can’t create new tempfile: ‘./domainhostseotool/wp_options.TMD’ |
| domainhostseotool.wp_options | repair | status   | Operation failed

 

How to repair the corrupted table?

go to /var/lib/mysql/domainhostseotool/ and execute the following command:

The result is:

- recovering (with sort) MyISAM-table ‘wp_options.MYI’
Data records:6089
- Fixing index 1
Found row block followed by deleted block
- Fixing index 2
Data records: 6088

After repairing, the table wp_options is recovered and my website is working normally.

 

Posted in tips of hosting