Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (6.1k points)

I am running a WordPress website. Today I saw that wp_posts table is crashed. When I tried to repair the table, I am getting the below error:

REPAIR TABLE wp_posts;

error Can't create new tempfile: './[databasename]/wp_posts.TMD' 

repair  status    Operation failed

I have tried to run the below command in the shell:

myisamchk -r -f wp_posts.MYI

error: File 'wp_posts.MYI' doesn't exist

Can anyone help me fix this issue?

1 Answer

0 votes
by (12.7k points)
edited by

Turned out that "myisamchk -r -f wp_posts.MYI" was the right solution. I simply had to go to the data folder.

In my CentOS system, I modified the directory to /var/lib/mysql/[database]/ and found wp_posts.MYI

After removing this file, the repair was successful.

You can kick-start your career in SQL programming by joining our SQL Training course now!

Related questions

0 votes
1 answer
asked Jul 24, 2019 in SQL by Tech4ever (20.3k points)
0 votes
1 answer
0 votes
1 answer
asked Jan 7, 2021 in SQL by Appu (6.1k points)
0 votes
1 answer
asked Jan 6, 2021 in SQL by Appu (6.1k points)

Browse Categories

...