0

I am getting the following error on my (localhost) test system after installing some modules:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bitnami_drupal7.cache_block' doesn't exist

After receiving the error, I uninstalled and removed the modules I was attempting to install thinking that a fresh module install might fix the problem. However, it's apparent to me that the install corrupted the database. Before I even attempted a new install of those modules, I get the above error while performing some other work. So, I used PHPMyAdmin to peek into the database. When I try to access cache_block, I get an error stating that it does not exist. Unfortunately, I do not have a recent back up since this is a test system. However, I do have a live production system.

Question: can I use the live production system to export the cache_block table structure and then import it into my localhost? If not, is there an alternative solution to resolve this error? I'd like to avoid having to reinstall Drupal.

1 Answer 1

1

can I use the live production system to export the cache_block table structure and then import it into my localhost?

Yes, that's exactly what you should do. Core cache tables have a common structure so you could even just duplicate cache_bootstrap or another from your local and rename it.

Don't bother importing the data as you'll want to clear caches after recreating the table anyway.

Personally I'd be tempted to also go and find out what caused it in the first place to make sure it can't happen again (and so the site can stay up to date).

1
  • Thanks. I just needed some reassurance I was going down the right path. I used the Copy operation (and Dropped the prior table) to copy the cache_bootstrap table and renamed it. All is fine now.
    – rrirower
    Commented Feb 2, 2017 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.