The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Error in DB (2 posts)

  1. Vizman
    Posted 3 years ago #

    Hi, I'm trying to access my wp-admin area (dashboard) but getting this error:

    WordPress database error Multiple primary key defined for query ALTER TABLE wp_woocommerce_downloadable_product_permissions ADD PRIMARY KEY (product_id,order_id,order_key,download_id) made by require_once('C:\HostingSpaces\xxxxx\xxxxx.com\wwwroot\wp-admin\admin.php'), do_action('admin_init'), call_user_func_array, Woocommerce->update, Woocommerce->install, do_install_woocommerce, woocommerce_tables_install, dbDelta

    Any ideas? It looks like an upgrade error of sorts.




  2. Mike Jolley
    Plugin Author

    Posted 3 years ago #

    Before doing that, the update process does this:

    $wpdb->query( "ALTER TABLE {$wpdb->prefix}woocommerce_downloadable_product_permissions DROP PRIMARY KEY" );

    So you shouldn't have a primary key. Does the MySQL user associated with your install have full Alter permissions?

    You could perhaps edit that table manually via PHPMyAdmin and drop the key yourself. That way the update process will set it correctly.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic