0

I'm facing the same problem shown in this thread: Mysql table repair failed: "Can't create new tempfile"

I'm a newbie here. So please consider this while reading the question. In the above thread, this was the solution:

service mysql stop
myisamchk -rf /config/databases/[databasename]/wp_posts.MYI
service mysql start

What if I have a different database name?

For example, if I'm seeing the error:

Can't create new tempfile: './waputepr_wp167/wpdm_redirection_404`

then this should be the correct line, right?

service mysql stop
myisamchk -rf /config/databases/waputepr_wp167/wp_posts.MYI
service mysql start

Is this approach correct?

Shayan Shafiq
  • 1,447
  • 5
  • 18
  • 25
snowcrest
  • 1
  • 1
  • If `/config/databases/` is the path to your databases, then yes. You would need to extrapolate the values from the answer to match your environment. Since this is essentially a question regarding usage of already provided answers, I am going to flag this question as duplicate. – Will B. Oct 14 '20 at 20:13
  • @Will B, thank you for your reply, but how can i find the path to my database? – snowcrest Oct 14 '20 at 20:15
  • See: [How to find the mysql data directory from command line in windows](https://stackoverflow.com/q/17968287/1144627) the answers given apply to all platforms. – Will B. Oct 14 '20 at 20:27
  • @Will B, in the above i think i made mistake? this should be line right? /var/lib/mysql/waputepr_wp167/wpdm_redirection_404.MYI – snowcrest Oct 14 '20 at 20:50
  • Thank you guys for helping me out to solve the problem. Below are the steps. – snowcrest Oct 15 '20 at 08:20
  • service mysqld start, myisamchk -r -f -o /var/lib/mysql/Databasename/wpdm_redirection_404, service mysqld stop. – snowcrest Oct 15 '20 at 08:23

0 Answers0