XF 1.5 Xenforo suddenly gives database error


Today my forum got this error suddenly;

An unexpected database error occurred. Please try again later.
This is what I get on View Source page.
<!-- Mysqli prepare error: Table 'db1_ucanveri.xf_data_registry' doesn't exist -->
When I log into phpmyadmin the table that error says is missing is actually there. But when I click the table on the sidebar it gives the following error;

I really don't understand what's going on and why this error suddenly appeared.

Can someone help me with that?

Tracy Perry

Well-known member
Can't help you with that (other than the fact it appears that table has been deleted).
But, it does look like your DB is in MyISAM format instead of InnoDB?
I see. You have a guess why it got deleted? Cuz I didn't do anything and when I woke up the site was giving this error.

I'm not sure about MyISAM or InnoDB. Don't know what they are.

Chris D

XenForo developer
Staff member
For the most part, the information in the xf_data_registry table can be rebuilt dynamically and automatically, so re-creating that table might be sufficient.

It may be preferable to restore the entire table from a recent backup, if possible, but if this is not possible, running the following query will create it:

CREATE TABLE xf_data_registry (
) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
Some add-ons may add data to this table (specifically inside the simpleCache key) so you may still have problems, hence why if you can restore the table and data from a backup, that would be preferable.

InnoDB is a storage engine for MySQL. By default the majority (but not all) XF tables are InnoDB. The screenshot isn't totally clear but most of the tables pictured seem to be MyISAM. Are those tables part of your XF installation or something else? Most of the tables which have an xf_ prefix should be listed as "InnoDB" but it's also true that we do have some MyISAM and MEMORY tables.


XenForo moderator
Staff member
Check with your host whether they have done any work on the server, specifically related to MySQL or your database.