Answers.Body: <p><strong>My solution is very noob, but it works:</strong> <br><br>
  <strong>1) backup the database first with myphpadmin, it will skip civicrm_acl_contact_cache since its corrupted<br>
  2) drop and restore the current db, use old civicrm database sql backup</strong> (if you don't have you can also create new civicrm and make new db backup)<strong>, open the sql file with notepad</strong> (I would use notepad++ or open sql workbench) <strong>find civicrm_acl_contact_cache <br></strong>
  <strong>3) copy paste and run all civicrm_acl_contact_cache SQL code in the SQL query box and there you go</strong></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-10T09:22:24.947Z
Answers.LastActivityDate: 2020-09-10T09:22:24.947Z
Answers.UserDisplayName: Jennifer Lee
Answers.Body: <p>Something has deleted your ibdata1 file where InnoDB keeps the dictionary. Definitely it's not MySQL who does it.</p>
  
  <p>Cheers</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-17T18:47:25.033Z
Answers.Text: Can you update your answer to show how you determined that Pradeep? It seems odd to me that CiviCRM / WordPress had got that far in the boot process if the entire DB has been removed, so I'm wondering what clue you're seeing and I'm missing!
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-17T17:00:45.687Z
Answers.LastActivityDate: 2019-01-17T17:00:45.687Z
Answers.UserDisplayName: Pradeep Nayak
Answers.Body: <p>As established from the comments on your original question, this appears to have been a corrupted MySQL table.</p>
  
  <p>CiviCRM was reporting in the backtrace that a core table did not exist:</p>
  
  <blockquote>
    <p>TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** <strong>Table 'example.civicrm_acl_contact_cache' doesn't exist in engine</strong>]</p>
  </blockquote>
  
  <p>You used MySQL to inspect the DB using <code>SHOW TABLES</code> (or <code>SHOW TABLES LIKE 'name_of_missing_table'</code>). MySQL reported the table was present. However, when you tried to drop the table, MySQL reported that the table was missing. </p>
  
  <p>Since the table is a cache table which CiviCRM can regenerate from other data in the DB, it was possible to replace the corrupted table's disk files. The <a href="https://stackoverflow.com/a/25720558/43034">workaround I believe you used</a> requires direct access to the files in the MySQL server's data directory - not an option for all sites.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-18T19:50:51.423Z
Answers.Text: These tables are write intensive and (aside from CiviCRM's `log_*` tables) in my experience are the most likely to fail due to disk corruption, have issues with deadlocks etc. If you feel bold enough, it might be good to investigate [moving them to MEMORY storage](https://dev.mysql.com/doc/refman/8.0/en/memory-storage-engine.html), which should reduce disk writes / risk of disk corruption, and probably reduce the chances of deadlocks along the way. **I haven't tried this myself**.
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-18T19:50:30.573Z
Answers.LastActivityDate: 2019-01-18T19:57:15.867Z
Answers.LastEditDate: 2019-01-18T19:57:15.867Z
Answers.UserDisplayName: Chris Burgess
Body: <p>this morning I started encountering database issues - the only thing I can think of is the upgrade to 5.9 that we did yesterday. </p>
  
  <p>First discovery was the Cron error - via log. </p>
  
  <pre><code>    Jan 17 10:15:02  [info] $Fatal Error Details = Array
  (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; handle
          )
  
      [code] =&gt; -1
      [message] =&gt; DB Error: unknown error
      [mode] =&gt; 16
      [debug_info] =&gt; TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in engine]
      [type] =&gt; DB_Error
      [user_info] =&gt; TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in engine]
      [to_string] =&gt; [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in engine]"]
  )
  
  
      Jan 17 10:15:02  [info] $backTrace = #0 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(232): CRM_Core_Error::backtrace("backTrace", TRUE)
      #1 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
      #2 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error-&gt;__construct("DB Error: unknown error", -1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...")
      #3 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error-&gt;__construct(-1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...")
      #4 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR-&gt;_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...", "DB_Error", TRUE)
      #5 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR-&gt;__call("raiseError", (Array:7))
      #6 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common-&gt;raiseError(-1, NULL, NULL, "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...", "1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in...")
      #7 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli-&gt;mysqliRaiseError()
      #8 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli-&gt;simpleQuery("TRUNCATE TABLE civicrm_acl_contact_cache")
      #9 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common-&gt;query("TRUNCATE TABLE civicrm_acl_contact_cache")
      #10 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject-&gt;_query("TRUNCATE TABLE civicrm_acl_contact_cache")
      #11 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(438): DB_DataObject-&gt;query("TRUNCATE TABLE civicrm_acl_contact_cache")
      #12 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1490): CRM_Core_DAO-&gt;query("TRUNCATE TABLE civicrm_acl_contact_cache", TRUE)
      #13 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/ACL/BAO/Cache.php(168): CRM_Core_DAO::singleValueQuery("TRUNCATE TABLE civicrm_acl_contact_cache")
      #14 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact/Utils.php(926): CRM_ACL_BAO_Cache::resetCache()
      #15 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(116): CRM_Contact_BAO_Contact_Utils::clearContactCaches()
      #16 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php(32): civicrm_cli-&gt;callApi()
      #17 {main}
  </code></pre>
  
  <p>Then the backtrace when trying to do anything.</p>
  
  <pre><code>pubic_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(190): CRM_Core_Error::backtrace()
  #1 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
  #2 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error-&gt;__construct("DB Error: unknown error", -1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...")
  #3 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error-&gt;__construct(-1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...")
  #4 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR-&gt;_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...", "DB_Error", TRUE)
  #5 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR-&gt;__call("raiseError", (Array:7))
  #6 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common-&gt;raiseError(-1, NULL, NULL, "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...", "1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in...")
  #7 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli-&gt;mysqliRaiseError()
  #8 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli-&gt;simpleQuery("TRUNCATE TABLE civicrm_acl_contact_cache")
  #9 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common-&gt;query("TRUNCATE TABLE civicrm_acl_contact_cache")
  #10 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject-&gt;_query("TRUNCATE TABLE civicrm_acl_contact_cache")
  #11 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(438): DB_DataObject-&gt;query("TRUNCATE TABLE civicrm_acl_contact_cache")
  #12 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1413): CRM_Core_DAO-&gt;query("TRUNCATE TABLE civicrm_acl_contact_cache", TRUE)
  #13 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php(362): CRM_Core_DAO::executeQuery("TRUNCATE TABLE civicrm_acl_contact_cache")
  #14 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Setting.php(145): CRM_Core_Config::clearDBCache()
  #15 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Setting.php(103): CRM_Admin_Form_Setting-&gt;commonProcess((Array:0))
  #16 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(489): CRM_Admin_Form_Setting-&gt;postProcess()
  #17 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form-&gt;mainProcess()
  #18 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine-&gt;perform(Object(CRM_Admin_Form_Setting_Debugging), "next", "Next")
  #19 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next-&gt;perform(Object(CRM_Admin_Form_Setting_Debugging), "next")
  #20 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Admin_Form_Setting_Debugging), "next")
  #21 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page-&gt;handle("next")
  #22 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller-&gt;run()
  #23 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(282): CRM_Utils_Wrapper-&gt;run("CRM_Admin_Form_Setting_Debugging", "Debugging", (Array:0))
  #24 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15))
  #25 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
  #26 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm.php(1240): CRM_Core_Invoke::invoke((Array:4))
  #27 /home5/tarabnyc/public_html/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress-&gt;invoke("")
  #28 /home5/tarabnyc/public_html/wp-includes/class-wp-hook.php(310): WP_Hook-&gt;apply_filters("", (Array:1))
  #29 /home5/tarabnyc/public_html/wp-includes/plugin.php(453): WP_Hook-&gt;do_action((Array:1))
  #30 /home5/tarabnyc/public_html/wp-admin/admin.php(224): do_action("toplevel_page_CiviCRM")
  </code></pre>
  
  <p>Lastly - when trying to upgrade from 5.9 to 5.9.1</p>
  
  <pre><code>Error: Finish Upgrade DB to 5.9.1]
  Error Field Error Value
  Type    DB_Error
  Code    -1
  Message DB Error: unknown error
  Mode    16
  UserInfo    TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in engine]
  DebugInfo   TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in engine]
  PEAR_Exception: DB Error: unknown error in /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php on line 921
  - DB_Error: DB Error: unknown error in unknown on line unknown
  Exception trace
  #   Function    Location
  0   CRM_Core_Error::exceptionHandler(Object(DB_Error))  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:921
  1   PEAR_Error-&gt;__construct('DB Error: unknow…', -1, 16, Array, 'TRUNCATE TABLE c…')    /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php:985
  2   DB_Error-&gt;__construct(-1, 16, Array, 'TRUNCATE TABLE c…')   /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:575
  3   PEAR-&gt;_raiseError(Object(DB_mysqli), null, -1, 16, Array, 'TRUNCATE TABLE c…', 'DB_Error', true)    /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:223
  4   PEAR-&gt;__call('raiseError', Array)   /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1907
  5   DB_common-&gt;raiseError(-1, null, null, 'TRUNCATE TABLE c…', '1932 ** Table 't…') /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php:933
  6   DB_mysqli-&gt;mysqliRaiseError()   /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php:403
  7   DB_mysqli-&gt;simpleQuery('TRUNCATE TABLE c…') /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1216
  8   DB_common-&gt;query('TRUNCATE TABLE c…')   /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:2415
  9   DB_DataObject-&gt;_query('TRUNCATE TABLE c…')  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:1607
  10  DB_DataObject-&gt;query('TRUNCATE TABLE c…')   /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:438
  11  CRM_Core_DAO-&gt;query('TRUNCATE TABLE c…', true)  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1490
  12  CRM_Core_DAO::singleValueQuery('TRUNCATE TABLE c…') /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/ACL/BAO/Cache.php:168
  13  CRM_ACL_BAO_Cache::resetCache() /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:1448
  14  CRM_Utils_System::flushCache()  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Form.php:721
  15  CRM_Upgrade_Form::doIncrementalUpgradeFinish(Object(CRM_Queue_TaskContext), '5.9.1', '5.9.0', '5.9.1', '/tmp/civicrm-pos…') /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php:88
  16  CRM_Queue_Task-&gt;run(Object(CRM_Queue_TaskContext))  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php:214
  17  CRM_Queue_Runner-&gt;runNext(true) /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:52
  18  CRM_Queue_Page_AJAX::{closure}()    /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/ErrorPolicy.php:106
  19  CRM_Queue_ErrorPolicy-&gt;call(Object(Closure))    /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:54
  20  CRM_Queue_Page_AJAX::runNext()  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:275
  21  CRM_Core_Invoke::runItem(Array) /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:84
  22  CRM_Core_Invoke::_invoke(Array) /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:52
  23  CRM_Core_Invoke::invoke(Array)  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm.php:1240
  24  CiviCRM_For_WordPress-&gt;invoke('')   /home5/tarabnyc/public_html/wp-includes/class-wp-hook.php:286
  25  WP_Hook-&gt;apply_filters('', Array)   /home5/tarabnyc/public_html/wp-includes/class-wp-hook.php:310
  26  WP_Hook-&gt;do_action(Array)   /home5/tarabnyc/public_html/wp-includes/plugin.php:453
      27  do_action('toplevel_page_Ci…')  /home5/tarabnyc/public_html/wp-admin/admin.php:224
  28  {main}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-17T18:51:24.203Z
Comments.Text: CiviCRM's reporting that some core tables are missing - would you check that you see the expected tables (MySQL: `SHOW TABLES`) in the expected database? Do you have WordPress and civicrm in the same DB? You might be able to restore that table from the pre upgrade backup, assuming one exists.
Comments.UserDisplayName: Chris Burgess
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-17T20:18:29.903Z
Comments.Text: civicrm_acl_contact_cache seems to be the issue - it appears when I use `SHOW TABLES` but if I try to drop the table - i get the error - civicrm_acl_contact_cache doesn't exist in engine.
Comments.UserDisplayName: themak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-17T21:45:51.147Z
Comments.Text: I can't comment on the second part of this - but the first error IS fixed by upgrading to 5.9.1.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-18T01:15:49.907Z
Comments.Text: I have seen issues where the table was visible in `SHOW TABLES` but not accessible as a table with data - roughly described in [this SE Q&A](https://stackoverflow.com/a/10622738/43034). Bad times - you may be looking at a full DB restore, and possibly even a full restore of ibdata 
Comments.UserDisplayName: Chris Burgess
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-18T01:17:20.277Z
Comments.Text: Try [this workaround](https://stackoverflow.com/a/25720558/43034) before you go too far! It may work out for you. A good time to check your backups & underlying systems (eg, are those disks healthy?).
Comments.UserDisplayName: Chris Burgess
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-18T17:19:16.993Z
Comments.Text: Thank you so much @ChrisBurgess - that helped! and yes - its a very important time to check backups and underlying systems - Provide an answer - I will select it.
Comments.UserDisplayName: themak
Tags: <database>
Title: Database Error - unsure what the issue is
ThreadText: # Database Error - unsure what the issue is
  
  (Asked by: username_0 on 2019-01-17)
  
  this morning I started encountering database issues - the only thing I can think of is the upgrade to 5.9 that we did yesterday. 
  First discovery was the Cron error - via log. 
      Jan 17 10:15:02  [info] $Fatal Error Details = Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )
  
      [code] => -1
      [message] => DB Error: unknown error
      [mode] => 16
      [debug_info] => TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in engine]
      [type] => DB_Error
      [user_info] => TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in engine]
      [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in engine]"]
  )
  
  
      Jan 17 10:15:02  [info] $backTrace = #0 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(232): CRM_Core_Error::backtrace("backTrace", TRUE)
      #1 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
      #2 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...")
      #3 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...")
      #4 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...", "DB_Error", TRUE)
      #5 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
      #6 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-1, NULL, NULL, "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...", "1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in...")
      #7 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
      #8 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("TRUNCATE TABLE civicrm_acl_contact_cache")
      #9 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query("TRUNCATE TABLE civicrm_acl_contact_cache")
      #10 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("TRUNCATE TABLE civicrm_acl_contact_cache")
      #11 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(438): DB_DataObject->query("TRUNCATE TABLE civicrm_acl_contact_cache")
      #12 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1490): CRM_Core_DAO->query("TRUNCATE TABLE civicrm_acl_contact_cache", TRUE)
      #13 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/ACL/BAO/Cache.php(168): CRM_Core_DAO::singleValueQuery("TRUNCATE TABLE civicrm_acl_contact_cache")
      #14 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact/Utils.php(926): CRM_ACL_BAO_Cache::resetCache()
      #15 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(116): CRM_Contact_BAO_Contact_Utils::clearContactCaches()
      #16 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php(32): civicrm_cli->callApi()
      #17 {main}
  
  Then the backtrace when trying to do anything.
  pubic_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(190): CRM_Core_Error::backtrace()
  #1 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
  #2 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...")
  #3 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...")
  #4 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...", "DB_Error", TRUE)
  #5 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
  #6 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-1, NULL, NULL, "TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_...", "1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in...")
  #7 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
  #8 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("TRUNCATE TABLE civicrm_acl_contact_cache")
  #9 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query("TRUNCATE TABLE civicrm_acl_contact_cache")
  #10 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("TRUNCATE TABLE civicrm_acl_contact_cache")
  #11 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(438): DB_DataObject->query("TRUNCATE TABLE civicrm_acl_contact_cache")
  #12 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1413): CRM_Core_DAO->query("TRUNCATE TABLE civicrm_acl_contact_cache", TRUE)
  #13 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php(362): CRM_Core_DAO::executeQuery("TRUNCATE TABLE civicrm_acl_contact_cache")
  #14 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Setting.php(145): CRM_Core_Config::clearDBCache()
  #15 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Setting.php(103): CRM_Admin_Form_Setting->commonProcess((Array:0))
  #16 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(489): CRM_Admin_Form_Setting->postProcess()
  #17 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
  #18 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Setting_Debugging), "next", "Next")
  #19 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Setting_Debugging), "next")
  #20 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Setting_Debugging), "next")
  #21 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
  #22 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
  #23 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(282): CRM_Utils_Wrapper->run("CRM_Admin_Form_Setting_Debugging", "Debugging", (Array:0))
  #24 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15))
  #25 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
  #26 /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm.php(1240): CRM_Core_Invoke::invoke((Array:4))
  #27 /home5/tarabnyc/public_html/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress->invoke("")
  #28 /home5/tarabnyc/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
  #29 /home5/tarabnyc/public_html/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
  #30 /home5/tarabnyc/public_html/wp-admin/admin.php(224): do_action("toplevel_page_CiviCRM")
  
  Lastly - when trying to upgrade from 5.9 to 5.9.1
  Error: Finish Upgrade DB to 5.9.1]
  Error Field Error Value
  Type    DB_Error
  Code    -1
  Message DB Error: unknown error
  Mode    16
  UserInfo    TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in engine]
  DebugInfo   TRUNCATE TABLE civicrm_acl_contact_cache [nativecode=1932 ** Table 'tarabnyc_wordpress.civicrm_acl_contact_cache' doesn't exist in engine]
  PEAR_Exception: DB Error: unknown error in /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php on line 921
  - DB_Error: DB Error: unknown error in unknown on line unknown
  Exception trace
  #   Function    Location
  0   CRM_Core_Error::exceptionHandler(Object(DB_Error))  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:921
  1   PEAR_Error->__construct('DB Error: unknow…', -1, 16, Array, 'TRUNCATE TABLE c…')    /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php:985
  2   DB_Error->__construct(-1, 16, Array, 'TRUNCATE TABLE c…')   /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:575
  3   PEAR->_raiseError(Object(DB_mysqli), null, -1, 16, Array, 'TRUNCATE TABLE c…', 'DB_Error', true)    /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:223
  4   PEAR->__call('raiseError', Array)   /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1907
  5   DB_common->raiseError(-1, null, null, 'TRUNCATE TABLE c…', '1932 ** Table 't…') /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php:933
  6   DB_mysqli->mysqliRaiseError()   /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php:403
  7   DB_mysqli->simpleQuery('TRUNCATE TABLE c…') /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1216
  8   DB_common->query('TRUNCATE TABLE c…')   /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:2415
  9   DB_DataObject->_query('TRUNCATE TABLE c…')  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:1607
  10  DB_DataObject->query('TRUNCATE TABLE c…')   /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:438
  11  CRM_Core_DAO->query('TRUNCATE TABLE c…', true)  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1490
  12  CRM_Core_DAO::singleValueQuery('TRUNCATE TABLE c…') /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/ACL/BAO/Cache.php:168
  13  CRM_ACL_BAO_Cache::resetCache() /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:1448
  14  CRM_Utils_System::flushCache()  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Form.php:721
  15  CRM_Upgrade_Form::doIncrementalUpgradeFinish(Object(CRM_Queue_TaskContext), '5.9.1', '5.9.0', '5.9.1', '/tmp/civicrm-pos…') /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php:88
  16  CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php:214
  17  CRM_Queue_Runner->runNext(true) /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:52
  18  CRM_Queue_Page_AJAX::{closure}()    /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/ErrorPolicy.php:106
  19  CRM_Queue_ErrorPolicy->call(Object(Closure))    /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:54
  20  CRM_Queue_Page_AJAX::runNext()  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:275
  21  CRM_Core_Invoke::runItem(Array) /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:84
  22  CRM_Core_Invoke::_invoke(Array) /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:52
  23  CRM_Core_Invoke::invoke(Array)  /home5/tarabnyc/public_html/wp-content/plugins/civicrm/civicrm.php:1240
  24  CiviCRM_For_WordPress->invoke('')   /home5/tarabnyc/public_html/wp-includes/class-wp-hook.php:286
  25  WP_Hook->apply_filters('', Array)   /home5/tarabnyc/public_html/wp-includes/class-wp-hook.php:310
  26  WP_Hook->do_action(Array)   /home5/tarabnyc/public_html/wp-includes/plugin.php:453
      27  do_action('toplevel_page_Ci…')  /home5/tarabnyc/public_html/wp-admin/admin.php:224
  28  {main}
  
  **Tags:** database
  
  > **Comments:**
  > **username_1**: CiviCRM's reporting that some core tables are missing - would you check that you see the expected tables (MySQL: `SHOW TABLES`) in the expected database? Do you have WordPress and civicrm in the same DB? You might be able to restore that table from the pre upgrade backup, assuming one exists.  
  > **username_0**: civicrm_acl_contact_cache seems to be the issue - it appears when I use `SHOW TABLES` but if I try to drop the table - i get the error - civicrm_acl_contact_cache doesn't exist in engine.  
  > **username_2**: I can't comment on the second part of this - but the first error IS fixed by upgrading to 5.9.1.  
  > **username_1**: I have seen issues where the table was visible in `SHOW TABLES` but not accessible as a table with data - roughly described in [this SE Q&A](https://stackoverflow.com/a/10622738/43034). Bad times - you may be looking at a full DB restore, and possibly even a full restore of ibdata   
  > **username_1**: Try [this workaround](https://stackoverflow.com/a/25720558/43034) before you go too far! It may work out for you. A good time to check your backups & underlying systems (eg, are those disks healthy?).  
  > **username_0**: Thank you so much @ChrisBurgess - that helped! and yes - its a very important time to check backups and underlying systems - Provide an answer - I will select it.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2019-01-18. Score: 3 | Accepted answer
  
  As established from the comments on your original question, this appears to have been a corrupted MySQL table.
  
  CiviCRM was reporting in the backtrace that a core table did not exist:
  
  > TRUNCATE TABLE civicrm\_acl\_contact\_cache [nativecode=1932 \*\* **Table 'example.civicrm\_acl\_contact\_cache' doesn't exist in engine**]
  
  You used MySQL to inspect the DB using `SHOW TABLES` (or `SHOW TABLES LIKE 'name_of_missing_table'`). MySQL reported the table was present. However, when you tried to drop the table, MySQL reported that the table was missing.
  
  Since the table is a cache table which CiviCRM can regenerate from other data in the DB, it was possible to replace the corrupted table's disk files. The [workaround I believe you used](https://stackoverflow.com/a/25720558/43034) requires direct access to the files in the MySQL server's data directory - not an option for all sites.
  
  > **Comments:**
  > **username_1**: These tables are write intensive and (aside from CiviCRM's `log_*` tables) in my experience are the most likely to fail due to disk corruption, have issues with deadlocks etc. If you feel bold enough, it might be good to investigate [moving them to MEMORY storage](https://dev.mysql.com/doc/refman/8.0/en/memory-storage-engine.html), which should reduce disk writes / risk of disk corruption, and probably reduce the chances of deadlocks along the way. **I haven't tried this myself**.  
  
  ---
  
  ### Answer by username_3 on 2020-09-10. Score: 0
  
  **My solution is very noob, but it works:**   
    
  **1) backup the database first with myphpadmin, it will skip civicrm\_acl\_contact\_cache since its corrupted  
  2) drop and restore the current db, use old civicrm database sql backup** (if you don't have you can also create new civicrm and make new db backup)**, open the sql file with notepad** (I would use notepad++ or open sql workbench) **find civicrm\_acl\_contact\_cache**
  **3) copy paste and run all civicrm\_acl\_contact\_cache SQL code in the SQL query box and there you go**
  
  
  ---
  
  ### Answer by username_4 on 2019-01-17. Score: 0
  
  Something has deleted your ibdata1 file where InnoDB keeps the dictionary. Definitely it's not MySQL who does it.
  
  Cheers
  
  Pradeep
  
  > **Comments:**
  > **username_1**: Can you update your answer to show how you determined that Pradeep? It seems odd to me that CiviCRM / WordPress had got that far in the boot process if the entire DB has been removed, so I'm wondering what clue you're seeing and I'm missing!  
  
  ---
  
  