Forums

WordPress database error: [Unknown column 'user_nickname' in 'field list'] (24 posts)

  1. JackonCrack
    Member
    Posted 1 month ago #

    I am trying to upgrade my WP install.

    I was using 2.X install and upgrading to 2.3.3

    Downloaded the wordpress-2.3.3.tar.gz off the site and proceeded to overwrite the files I was supposed to (and not the ones I didn't need to since it was an upgrade, I followed the directions on the site.)

    However I have been stuck. I get this message when I tr to login to my wp-admin section:

    Database Upgrade Required

    Your WordPress database is out-of-date, and must be upgraded before you can continue.

    The upgrade process may take a while, so please be patient.
    Upgrade WordPress ยป

    I click the Upgrade link and get:

    WordPress database error: [Unknown column 'user_nickname' in 'field list']
    SELECT ID, user_nickname, user_nicename FROM wp_users

    I don't think it upgraded my database.

    I have tried searching for similar people with this problem ( no one's seemed to be resolved), I have also tried:

    *fresh WP install (all files from previous install trashed, new ones uploaded)

    *the login patch

    *this link: http://remysharp.com/2008/02/06/how-i-fixed-wordpress-broken-upgrade/

    *dropping my MySQL database and creating a new one and importing my tables into THAT and then directing the config file ( i thought maybe my host has upgraded mySQl and somehow WP wasn't "recognizing" my db)

    I've looked for user_nickname in my users table but I don't really know WHAT I'm looking for or how to fix it given that error message.

    I guess I'm asking:

    does anyone recognize this problem/error message?

  2. JackonCrack
    Member
    Posted 1 month ago #

    Hey, so if it didn't upgrade my database (for whatever reason) is there a way to check if it did in PhpMy Admin?

    What would I be looking for to see if it DID upgrade? Can i manually upgrade the DB if upgrade.php isn't doing it for me?

    this is all guess work for me, assuming i'm getting the

    WordPress database error: [Unknown column 'user_nickname' in 'field list']
    SELECT ID, user_nickname, user_nicename FROM wp_users

    message because upgrade.php didn't Upgrade my old tables?

  3. wolfmank
    Member
    Posted 1 month ago #

    I am having the exact same problem and also don't know what to do. Luckily the site is still taking content from my offline post writer, but not having access is annoying as hell.

    If I find a solution that works I will post it here, but in the mean time I am looking for help as well. Please help if you can.

  4. Otto42
    Moderator
    Posted 1 month ago #

    What does the table structure of your users table look like in phpMyAdmin?

  5. wolfmank
    Member
    Posted 1 month ago #

    From my phpmyadmin wp_users Structure tab.

    Error
    SQL query:

    SHOW INDEX FROM wp_users ;

    MySQL said:

    #1142 - SELECT command denied to user ''@'localhost' for table 'wp_users'

  6. Otto42
    Moderator
    Posted 1 month ago #

    Sounds like your database has some kind of permissions problem. Give yourself permissions to access the table. If you can't do it, have your host do it.

  7. wolfmank
    Member
    Posted 1 month ago #

    Actually... I am getting that for every wp_* table. :( Should that be?

  8. wolfmank
    Member
    Posted 1 month ago #

    How do I give myself permissions? I don't see that in phpmyadmin.. ?

  9. Otto42
    Moderator
    Posted 1 month ago #

    Maybe your phpMyAdmin is using the wrong username and password to access the database. It should be the same username/password as your WordPress config file has in it.

    I really can't teach you how to use phpMyAdmin, because I'm not an expert on it myself.

  10. wolfmank
    Member
    Posted 1 month ago #

    ok yeah sorry was using the wrong username to access phpmyadmin posting table structure for wp_users now.

    http://img.skitch.com/20080324-3tp3ns15kmcdfgc3ytedkufmn.jpg

    Thats a link to a screen grab showing the print version of the table structure.

    Here is the paste:

    ID 	bigint(20)	No
    user_login 	varchar(60)	No
    user_pass 	varchar(64)	No
    user_nicename 	varchar(50)	No
    user_email 	varchar(100)	No
    user_url 	varchar(100)	No
    user_registered 	datetime	No 	0000-00-00 00:00:00
    user_activation_key 	varchar(60)	No
    user_status 	int(11)	No 	0
    display_name 	varchar(250)	No
  11. Otto42
    Moderator
    Posted 1 month ago #

    Well, that is correct. That's what it is supposed to be.

    Looking closer at the upgrade sequence, you should not be getting that user-nickname field in there unless you're upgrading from before WordPress version 1.5.

    What is the value of the db_version option in the options table?

  12. wolfmank
    Member
    Posted 1 month ago #

    option_name "db_version" has option_value "1"in the wp_options table.

    Is that what you are asking?

  13. Otto42
    Moderator
    Posted 1 month ago #

    Yes, and that's big time wrong and the cause of your major problem. I have no idea how you got "1" in there. It should be somewhere in the 4000-7000 range.

    Is there, by any chance, more than one entry with the name of db_version? See if you can find a second one. If so, then delete the first one with '1' and rerun the upgrade. But only try that if you find another db_version entry that is not '1'.

  14. wolfmank
    Member
    Posted 1 month ago #

    whoa...

    No there is no other db_version in the wp_options table... :(

    The interesting thing is the site is still up and running, it's the dashboard that won't display complains of wanting a db upgrade.

    All my articles are there and I can post new content via an offline editor. :(

  15. wolfmank
    Member
    Posted 1 month ago #

    Is there anyway to fix this?

  16. wolfmank
    Member
    Posted 1 month ago #

    Otto? anyone? Help!

  17. Otto42
    Moderator
    Posted 1 month ago #

    Well, you're kinda screwed unless you know what your db_version was supposed to be. If you know what version you were running before, you can grab that and look at the wp-includes/version.php file to see what the db version should have been.

    But if it was me, I'd export the blog's content, start a new blog entirely, and reimport that content. Start fresh, basically.

  18. wolfmank
    Member
    Posted 1 month ago #

    Well that is in the game plan but I was hoping to pull this one back to life before I had to start over.

    So basically if I can find the old version number i can just change that field in phpmyadmin where we were yesterday to what it should be and we should be good to go?

    In theory....?

    version.php
    <?php

    // This holds the version number in a separate file so we can bump it without cluttering the SVN

    $wp_version = '2.3.3';
    $wp_db_version = 6124;

    ?>

  19. wolfmank
    Member
    Posted 1 month ago #

    Holy Shit it worked! Thanks Otto, you are the best. much love and thanks.

    well it mostly worked, I can't moderate comments, and akismet is off line... but everything else seems to be ok... it's workable until I get the fresh install. :)

  20. wolfmank
    Member
    Posted 1 month ago #

    Categories are also missing in action... wow I wonder what happened that fubar'd my database so much.

  21. sosa
    Member
    Posted 1 month ago #

    I have the same exact problem. My host was able to get everything fixed up to the categories part. All 600 + articles / posts form 2 years ago are all uncategorized!

    Does anyone happen to know of a fix for this? I did save the sql database before I upgraded to the newest wordpress after getting the out of date error.

  22. fnkdumplin
    Member
    Posted 1 month ago #

    Wolfmank, I too have been experiencing the exact same issue, but I've located my db_version: it's 6124. I think you were looking at the Structure of that field, not the Value.

    Otto42, what does this mean exactly? And why is nicename so "not nice" when it comes to a mandatory update of the database?

    If worse comes to worse, I'm just gonna take your advice, export my database, blow out the blog altogether, then import the db back into the new, fresh, clean WordPress.

  23. fnkdumplin
    Member
    Posted 1 month ago #

    Here's another idea. What if we just blew out user_nickname altogether. I'm seeing 'user_nicename,' but I don't see 'user_nickname' in any of my other WP sites I own. Perhaps it's a rogue field from some plug-in, and disabling plug-ins just isn't doing a good job of dropping it.

  24. fnkdumplin
    Member
    Posted 1 month ago #

    Turns out, there's a plug-in we must be using that conflicted with WordPress's ability to complete the db upgrade. Here's what my server people emailed me:

    "I had to manually upgrade your blog to 2.3.3 to repair the error with the database upgrade. Once the blog was up to date, the posting functionality was still not working properly. I had to de-activate all plugins on your blog in order to restore full functionality, and I was able to successfully make some test posts after doing this (which I deleted immediately). Your blog is back in working order now, but you will need to go through and re-activate any plugins you were using before the issue with your blog started. If you have any questions or need anything else, please let us know."

Reply

You must log in to post.

About this Topic