log table corrupted, how to restore?

log table corrupted, how to restore?

by N Hansen -
Number of replies: 0
I've been having troubles with mysql going down for my site the last couple weeks, and it appears to be related to my logs. My host has repaired my mdl_log table several times but he thinks it is corrupted and needs to be cleared and rebuilt. However, I don't want to lose my logs if at all possible.

I can imagine two possible fixes for this, but since I know very little about how this database works I wanted to get some opinion on it:

1-I could just delete the table and restore a version of the table that I have backed up in a complete database backup from before these problems started occuring. However, I would lose several weeks of logs.

2-I could delete the table, create an empty one, and then using course restore, restore the logs to it from a recent backup (or even a new backup). This seems like it would be the best way to keep everything...but my question about this would be whether the corruption in the log table could have been transferred in some way to the course backup files, or should they be ok and be restorable?

PS-When I look at the log with Phpmyadmin I see the following in mdl_log:

Warning More than one INDEX key was created for column `course`

and in mdl_log_display

Warning No index defined!

Could that be the problem?
Average of ratings: -