WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Error in DB (2 posts)

  1. Vizman
    Member
    Posted 1 year 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.

    TIA,

    Viz

    http://wordpress.org/extend/plugins/woocommerce/

  2. mikejolley
    Member
    Plugin Author

    Posted 1 year 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

About this Topic