Title: Database error
Last modified: June 21, 2020

---

# Database error

 *  Resolved [horsebutte](https://wordpress.org/support/users/horsebutte/)
 * (@horsebutte)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/database-error-315/)
 * I had the problem not seeing the product details in orders. Client also did not
   see the items in their order confirmation.
    Then today I see an error when putting
   items into the cart. Maybe somebody can help. Thanks
 * Cart
    WordPress database error: [Unknown storage engine ‘InnoDB’] SELECT SUM(
   order_item_meta.meta_value ) AS held_qty FROM wp_ikg27x_posts AS posts LEFT JOIN
   wp_ikg27x_postmeta as postmeta ON posts.ID = postmeta.post_id LEFT JOIN wp_ikg27x_woocommerce_order_items
   as order_items ON posts.ID = order_items.order_id LEFT JOIN wp_ikg27x_woocommerce_order_itemmeta
   as order_item_meta ON order_items.order_item_id = order_item_meta.order_item_id
   LEFT JOIN wp_ikg27x_woocommerce_order_itemmeta as order_item_meta2 ON order_items.
   order_item_id = order_item_meta2.order_item_id WHERE order_item_meta.meta_key
   = ‘_qty’ AND order_item_meta2.meta_key = ‘_product_id’ AND order_item_meta2.meta_value
   = 20105 AND postmeta.meta_key = ‘_created_via’ AND postmeta.meta_value = ‘checkout’
   AND posts.post_type IN ( ‘shop_order’,’shop_order_refund’ ) AND posts.post_status
   = ‘wc-pending’ AND posts.ID != 0;
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatabase-error-315%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Remi Corson](https://wordpress.org/support/users/corsonr/)
 * (@corsonr)
 * Automattic Happiness Engineer
 * [5 years, 11 months ago](https://wordpress.org/support/topic/database-error-315/#post-13017534)
 * Hi there,
 * In most cases, this kind of issue can occur if there is a conflict with a plugin
   altering the order and priority of scripts being run. Please note that the theme
   can be involved too.
 * I haven’t been able to replicate the issue on a fresh install, so I suspect the
   problem may be related to a compatibility conflict with one of your active plugins
   or theme.
 * To test if this is the case, can you perform the below steps:
 * 1. Make sure all of your plugins are updated to their latest versions and see
   if the problem still persists.
    2. Install and activate the [Health Check & Troubleshooting](
   [https://en-au.wordpress.org/plugins/health-check/](https://en-au.wordpress.org/plugins/health-check/))
   plugin. This plugin allows you to troubleshoot your website without affecting
   any customers that may be browsing your website. 3. Go to `Tools > Health Check
   > Troubleshooting tab > Enable troubleshooting mode`. 4. When the page refreshes,
   at the top of the page, click on the toggle arrow beside `Available Themes and
   make sure a default WordPress theme is activated. (Such as TwentyNineteen or [
   Storefront]([https://woocommerce.com/storefront/?aff=10486&cid=1131038](https://woocommerce.com/storefront/?aff=10486&cid=1131038))).
   5. Go to `Plugins. You'll see all plugins have been deactivated. Please activate
   only`WooCommerce` core and the addon(s) you want to test. 6. If step 5 fixes 
   the issue, reactivate each plugin one at a time, and then see if the issue pops
   up again. This will tell us which plugin is conflicting. 7. You can then click`
   Disable Troubleshooting Mode` at the top of the website to return back to normal.
 * Alternatively, you can choose to do this manually as per the following docs:
 * – [https://docs.woocommerce.com/document/how-to-test-for-conflicts/](https://docs.woocommerce.com/document/how-to-test-for-conflicts/)
 * With the above test, we’ll be able to know if the problem is related to a compatibility
   conflict (as we’re not able to replicate it on a fresh install) and to get more
   information of any possible errors that are generated during this process.
 * If you don’t want to perform the above steps on your live site, you can clone
   your site to a staging environment, where you can test without affecting your
   users. If your host doesn’t provide staging facilities, a simple way to do it
   is using the free WP Staging plugin:
 * – [https://wordpress.org/plugins/wp-staging/](https://wordpress.org/plugins/wp-staging/)
 * Please let us know how you go with it and if you have any further information
   to share with us. We will be happy to help.
 *  Thread Starter [horsebutte](https://wordpress.org/support/users/horsebutte/)
 * (@horsebutte)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/database-error-315/#post-13019545)
 * Thanks for your response.
    I did use the Health check and Troubleshooting plugin.
   Theme is Twenty Twenty and just activated the woocommerce plugin. Same error 
   code: WordPress database error: [Unknown storage engine ‘InnoDB’] SELECT SUM(
   order_item_meta.meta_value ) AS held_qty FROM wp_ikg27x_posts AS posts LEFT JOIN
   wp_ikg27x_postmeta as postmeta ON posts.ID = postmeta.post_id LEFT JOIN wp_ikg27x_woocommerce_order_items
   as order_items ON posts.ID = order_items.order_id LEFT JOIN wp_ikg27x_woocommerce_order_itemmeta
   as order_item_meta ON order_items.order_item_id = order_item_meta.order_item_id
   LEFT JOIN wp_ikg27x_woocommerce_order_itemmeta as order_item_meta2 ON order_items.
   order_item_id = order_item_meta2.order_item_id WHERE order_item_meta.meta_key
   = ‘_qty’ AND order_item_meta2.meta_key = ‘_product_id’ AND order_item_meta2.meta_value
   = 20105 AND postmeta.meta_key = ‘_created_via’ AND postmeta.meta_value = ‘checkout’
   AND posts.post_type IN ( ‘shop_order’,’shop_order_refund’ ) AND posts.post_status
   = ‘wc-pending’ AND posts.ID != 0;
 *  Thread Starter [horsebutte](https://wordpress.org/support/users/horsebutte/)
 * (@horsebutte)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/database-error-315/#post-13021081)
 * I found out why I did see that error message. My hosting company changed to debug
   mode.
    But the error still occurs, thankfully my clients don’t see it anymore.
 * I have two things I noticed do not work.
    -I do not get order details from an
   order, nor does the client get the detail what he just bought, just that he did
   order something. -I can’t put attributes in the “Add new attributes” menu. I’m
   able to put Variations on a product post, but it won’t save Attributes to the
   menu.
 * And I did what you wrote above, have only woocommerce plugin active and used 
   now storefront theme. Still same problems.
    I’m in the process to change MySQL
   from 5.5.62. Which version does woocommerce recommend?
 * Thanks
 *  [jessepearson](https://wordpress.org/support/users/jessepearson/)
 * (@jessepearson)
 * Automattic Happiness Engineer
 * [5 years, 10 months ago](https://wordpress.org/support/topic/database-error-315/#post-13210559)
 * [@horsebutte](https://wordpress.org/support/users/horsebutte/) WooCommerce stays
   in line with WordPress with server recommendations, which would be MySQL 5.6,
   as noted here: [https://wordpress.org/about/requirements/](https://wordpress.org/about/requirements/)
 * As for the database error: `Unknown storage engine ‘InnoDB’` this is something
   your host would need to fix with the database itself. A couple of references 
   can be found in other plugins’ support threads:
 * [https://wordpress.org/support/topic/error-unknown-storage-engine-innodb-database/](https://wordpress.org/support/topic/error-unknown-storage-engine-innodb-database/)
   
   [https://wordpress.org/support/topic/unknown-storage-engine-innodb-8/](https://wordpress.org/support/topic/unknown-storage-engine-innodb-8/)
 * Basically, WooCommerce and/or WordPress is trying to save and/or access data 
   and it cannot due to the database configuration is not correct.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Database error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [order details](https://wordpress.org/support/topic-tag/order-details/)

 * 4 replies
 * 3 participants
 * Last reply from: [jessepearson](https://wordpress.org/support/users/jessepearson/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/database-error-315/#post-13210559)
 * Status: resolved