Support » Plugin: WooCommerce » Error in DB

  • 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\\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.



Viewing 1 replies (of 1 total)
  • Plugin Author Mike Jolley


    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Error in DB’ is closed to new replies.