• Hello,
    Just tried doing an upgrade here as noted in subject.
    After login had to do the database upgrade.
    That process gave a long list of errors starting with one that the wp_terms table did not exist.
    There is no wp_taxonomy table either and I saw that in some posts related to the errors I’m now experiencing.

    So why doesn’t the upgrade script know what tables should exist or isn’t able to create them?
    Now if i try to run upgrade again then it says “no upgrade needed” but there’s at least a few tables that don’t exist.

    Symptoms are showing now as no categories. I see other posts about how to fix that but the instructions all talk about editing the wp_taxonomy table – but I don’t have that table.

    What a mess. Does anyone know the way to fix this problem. Do I have to upgrade to some intermediate version before 2.6 – it doesn’t seem to work at all from 2.1.3

    Chris ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • If you have the ability, I’d be tempted to go back to your originals, and then upgrade in a few steps, ‘cos I have seen a few people here who have done big jumps that have had issues.

    Thread Starter 762165

    Yes, just restored DB and ran upgrade again. These are errors below and as before it says “SUCCESSFUL”. Me thinks this upgrade could be a bit smarter. Do you have any suggestions what would be good steps as I haven’t been following each intermediate upgrade. Perhaps 2.1 -> 2.3 ->2.6?

    WordPress database error: [Table ‘indieblog.wp_terms’ doesn’t exist]
    SELECT term_id, term_group FROM wp_terms WHERE slug = ”

    WordPress database error: [Table ‘indieblog.wp_terms’ doesn’t exist]
    INSERT INTO wp_terms (term_id, name, slug, term_group) VALUES (1, ”, ”, 0)

    WordPress database error: [Table ‘indieblog.wp_term_taxonomy’ doesn’t exist]
    INSERT INTO wp_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( 1, ‘category’, ”, 0, 1)

    WordPress database error: [Table ‘indieblog.wp_terms’ doesn’t exist]
    SELECT term_id, term_group FROM wp_terms WHERE slug = ”

    WordPress database error: [Table ‘indieblog.wp_terms’ doesn’t exist]
    INSERT INTO wp_terms (term_id, name, slug, term_group) VALUES (2, ”, ”, 0)

    WordPress database error: [Table ‘indieblog.wp_term_taxonomy’ doesn’t exist]
    INSERT INTO wp_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( 2, ‘category’, ”, 0, 0)

    WordPress database error: [Table ‘indieblog.wp_terms’ doesn’t exist]
    SELECT term_id, term_group FROM wp_terms WHERE slug = ”

    WordPress database error: [Table ‘indieblog.wp_terms’ doesn’t exist]
    INSERT INTO wp_terms (term_id, name, slug, term_group) VALUES (3, ”, ”, 0)

    WordPress database error: [Table ‘indieblog.wp_term_taxonomy’ doesn’t exist]
    INSERT INTO wp_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( 3, ‘category’, ”, 0, 0)

    WordPress database error: [Table ‘indieblog.wp_terms’ doesn’t exist]
    SELECT term_id, term_group FROM wp_terms WHERE slug = ”

    WordPress database error: [Table ‘indieblog.wp_terms’ doesn’t exist]
    INSERT INTO wp_terms (term_id, name, slug, term_group) VALUES (5, ”, ”, 0)

    WordPress database error: [Table ‘indieblog.wp_term_taxonomy’ doesn’t exist]
    INSERT INTO wp_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( 5, ‘category’, ”, 0, 0)

    WordPress database error: [Table ‘indieblog.wp_terms’ doesn’t exist]
    SELECT term_id, term_group FROM wp_terms WHERE slug = ”

    WordPress database error: [Table ‘indieblog.wp_terms’ doesn’t exist]
    INSERT INTO wp_terms (term_id, name, slug, term_group) VALUES (6, ”, ”, 0)

    WordPress database error: [Table ‘indieblog.wp_term_taxonomy’ doesn’t exist]
    INSERT INTO wp_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( 6, ‘category’, ”, 0, 0)

    WordPress database error: [Table ‘indieblog.wp_term_relationships’ doesn’t exist]
    INSERT INTO wp_term_relationships (object_id, term_taxonomy_id) VALUES ( 5, 98)

    WordPress database error: [Table ‘indieblog.wp_term_taxonomy’ doesn’t exist]
    SELECT term_taxonomy_id, taxonomy FROM wp_term_taxonomy

    WordPress database error: [DROP command denied to user ‘savery’@’localhost’ for table ‘wp_categories’]
    DROP TABLE IF EXISTS wp_categories

    WordPress database error: [DROP command denied to user ‘savery’@’localhost’ for table ‘wp_link2cat’]
    DROP TABLE IF EXISTS wp_link2cat

    WordPress database error: [DROP command denied to user ‘savery’@’localhost’ for table ‘wp_post2cat’]
    DROP TABLE IF EXISTS wp_post2cat
    Upgrade Complete

    Your WordPress database has been successfully upgraded!

    I’m going to test it just now to find out.

    Thread Starter 762165

    I just ran several attempts to upgrade earlier versions.
    I tried 2.2.3 and just 2.2 and both fail with the same results.
    I found out my db_version value is 4773. The upgrade seems to delineate at version 4772 and above. This means the routine called is update_old_slugs().
    I don’t know if I’m doing this right. I don’t want to re-install the whole site over and over. I have been untaring the archives into directories and then copying wp-admin subtree over the real tree. Then I run the upgrade.php again. So far all attempts give the same errors.
    Chris ??

    Ok first thing –

    I upgraded a stock WP 2.1.3 -> 2.6 and the database upgrade finished no problem, I have all the correct tables.

    However, the categories have all vanished.

    I then tried Wp 2.1.3 -> 2.2 -> 2.6 and the categories had all vanished.

    I then tried 2.1.3 -> 2.2 -> 2.5 and that completely broke.

    SO basically it seems stuffed. Will keep trying.

    Thread Starter 762165

    I’ve managed to get 2.13 -> 2.2 -> 2.3 to work ok.
    But I saw an error relating to user permissions to create table.
    I modified the db user permissions to allow ALL operations. And then ran -> 2.3 and it worked. So I’m betting this whole issue is related to these permissions. Typically users don’t give such wide permission to special users for security reasons. I am going to try now -> 2.5 and see if it works.

    Thanks for your input.

    The succesful upgrade path seems to be via version 2.3.

    This both created all the tables, and maintained categories.

    Thread Starter 762165

    OK. Success.
    I continued -> 2.5 and then -> 2.6.
    Got no database errors and have categories back.

    My process was like this:

    tar up current 2.6 version blog tree
    1-untar 2.2 into blog tree
    2-chg owners/perms on full tree to work
    3-run upgrade.php – make sure no errors
    repeat 1-3 again with 2.3, 2.5, and 2.6
    then untar my original 2.6 files (there were other edits) in blog tree
    so far it looks ok.

    Probably this problem was caused by bad db user privileges.

    Hope this helps someone else though.

    Chris ??

    Partially perhaps, but even with a full user it seems you have to go via 2.3 to upgrade properly.

    Thread Starter 762165

    Could be. I think what’s needed is that the upgrade.php actually says something like “not successful”. I wouldn’t be surprised if users do these upgrades and see messages but ignore them since they see the result saying “successful”. People don’t really know what to ignore or not.

    Perhaps having the script scan the output for key words like “doesn’t exist”, and then outputing a message to let users know it’s not OK. This would have to be smart enough to know which ones are critical and wich can be ignored.

    Did further testing and all seems good.

    Chris ??

    Sorry for the necropost. We experienced exactly the same error when we upgraded from 2.1.0 to 2.6.2 and when I Googled the errors I landed up here — nothing else out there seems relevant.

    I suspect that no-one who upgrades from versions 2.2 and newer will experience this.

    After a long and arduous battle, I think we’ve tracked down the issue to the default values used in the wp-config-sample.php file that comes with WP2.6 (2.6.1 and 2.6.2 had it). If you just copy and paste

    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', 'utf8-general-ci');

    into your wp-config.php then I reckon you’re guaranteed to have problems.

    From what I can tell utf8-general-ci isn’t a valid value for a MySQL collation… the dashes have to be underscores, i.e. utf8_general_ci.

    And what kind of WordPress users would we be if we didn’t blog about it ?? So for some (not so) shameless self promotion and more detailed ramblings on this issue, check out Gabriel’s post at Entropy.

    I’m pretty certain about this, but if anyone out there can verify my theory I’d be much obliged.

    Also note, if you have upgraded from versions before 2.2 you SHOULD NOT have the DB_CHARSET and DB_COLLATE statements in your wp-config.php file.

    See the warnings about this issue in Editing wp-config.php

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Upgrade 2.1.3 to 2.6 Database errors – no wp_terms table etc’ is closed to new replies.