1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Xenforo suddenly gives database error

Discussion in 'Troubleshooting and Problems' started by FeelingPeckish, Oct 8, 2016.

  1. Hello,

    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?
  2. Tracy Perry

    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?
  3. 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.
  4. Chris D

    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 (
       data_value MEDIUMBLOB NOT NULL
    ) 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.
    maszd likes this.
  5. Tracy Perry

    Tracy Perry Well-Known Member

  6. Brogan

    Brogan XenForo Moderator Staff Member

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

Share This Page