MySQL Dump fails

MySQL Dump fails

by T K -
Number of replies: 2

Hi All,

I am using Moodle 3.4 mysql 5.6.40

I noticed that the mysqldump fails with the below error:

mysqldump: Got error: 1146: Table 'aicb_prod.mdl_tag_correlation' doesn't exist when using LOCK TABLES


I checked into the mysql DB, there is mdl_tag_correlation table, but it is empty. It does not contain any data at all. Would it be fine to just delete it?


Thanks!

Average of ratings: -
In reply to T K

Re: MySQL Dump fails

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
No, you can't just delete arbitrary tables from the Moodle database and expect it to keep working. You may not have any data written to that table, but that doesn't mean that there aren't queries that will access that table to see if there are any matching records there (which will fail with an error message if the table is missing).

I'm afraid I can't really help with the original error, but it does sound like something has gone wrong with your database configuration or data, as it doesn't sound like the sort of situation that should normally be able to occur.
In reply to T K

Re: MySQL Dump fails

by Benjamin Ellis -
Picture of Particularly helpful Moodlers
Hi,

Try running 'mysqlcheck -u mysql_username -p aicb_prod' on your database - it may have been corrupted. Failing that, it appears that deleting - suggest you move it instead - the mdl_tag_correlation.frm file should resolve the issue. I would access the table in mysql before attempting to use mysqldump again.

Good Luck