• olongcha

    (@olongcha)


    Hello,

    after upgrading to v2.13, I got the following error when I start the /wp-admin/upgrade.php

    error:
    WordPress database error: [Unknown column ‘link_count’ in ‘where clause’]
    SELECT * FROM wp_categories WHERE cat_ID > 0 AND link_count > 0 ORDER BY cat_name ASC

    Can some one guide me on how I may be able to repair this error?

    TIA.

Viewing 11 replies - 1 through 11 (of 11 total)
  • kshipp

    (@kshipp)

    I get the same error – TWICE! Where is the support!?????

    MichaelH

    (@michaelh)

    kshipp–do your databases agree in structure with Database Description?

    May need to redo upgrade.php if not.

    MichaelH

    (@michaelh)

    kshipp–if you’ve restored and redone the upgrade, then consider restoring your database to a state before the upgrade, then check and repair all your database tables with phpMyAdmin before doing the upgrade again.

    I got this same error a number of times myself. I knew that I was upgrading correctly, so I couldn’t figure what was going on.

    Here’s what I had to do to fix the problem and get everything running correctly. I’m not sure if all steps are necessary (especially the theme part) , but this is what worked for me.

    In addition to disabling ALL plugins prior to upgrading, i had to put the theme into default mode.

    I also had to make sure that my WPUser had access to ALTER tables in mysql. This was a big part of my problem. After I granted this access, the install went fine.

    I then changed the theme back and enabled the plugins.

    I have have the same problem upgrading from 2.0.x to 2.2.1. Since I am going through Yahoo and had the Automatic Updates turned on, I expected that to do something automatically, I guess. Foolish, foolish me.

    Since I am very new to digging “under the hood” for this sort of stuff I was pretty nervous about manually upgrading… So it was pretty disheartening to see the

    [Unknown column ‘link_count’ in ‘where clause’]
    SELECT * FROM wp_categories WHERE cat_ID > 0 AND link_count > 0 ORDER BY cat_name ASC

    error, look through the Forums, try to run upgrade.php again and again only to be told that everything is fine.

    (I also know better than to angerly rail against the people who are giving away a free and awesome tool because they did not have the wherewithall to predict every permutation of problem known to man and provide a solution in advance.)

    Where am I going with this? I fixed my (Yahoo-based?) problem like this after going through the Codex (INCLUDING BACKING UP EVERYTHING!):
    1) Log into your Yahoo account
    2) Make sure you have phpMyAdmin installed. What is this? Don’t know if you have it installed? Click here.
    2) After you are sure it is installed, from the Web Hosting Control Panel go to the Manage tab
    3) Click File Manager
    4) Open the SQLadmin folder
    5) Click on index.php. This will open your SQL database login screen.
    6) Log in. You are now in the phpMyAdmin tool.
    7) Back up the database where your blog is. If you do not know how to do this, go here:
    8 After you have done this (or, like me, you were so mad you just didn’t care anymore) open your blog database by selecting the appropriate choice from the list on the left.
    9) You will see a table named wp_categories. Click on the little “structure” icon to the right of the table name.
    10) A list of table fields comes up. Great. Now what?
    11) Open up another browser window and go here. You will see a database description for wp_categories if you scroll down a bit.
    12) This list is a little longer than the one you see in your SQL database. We need to add the missing items.
    13) Under the list of fields in the database is a hard-to-see (for me, anyway) section that allows you to add fields. With the At End of Table button selected, click ‘Go’.
    14) You will now name the new field link_count, set the type to BIGINT, the length to 20, and the default value to 0. Save your changes.
    15) Do steps 13 and 14 with posts_private and links_private.
    16) Get out of the phpMyAdmin tool and check out your site. If there is still no change, change your theme to something else, and then back again. Sometimes I have to do that to get things to “take”.

    Like I said, I am not an expert in any of this but I stumbled upon this solution and it appears to work for me so far.

    (I also know better than to angerly rail against the people who are giving away a free and awesome tool because they did not have the wherewithall to predict every permutation of problem known to man and provide a solution in advance.)

    Well said! 🙂 and a wonderful post! If i could give you a prize, I honestly would 🙂

    unplugnow,

    that was the simplest, easiest, best described and fastest solution to a seemingly complex problem i’ve ever seen… you should write tutorials.

    thanks

    unplugnow – you’re my hero. Thank you.

    What folder do I need to install phpMyAdmin to? If I install it in my blog folder it totally overwrites the index file of course which screws everything up. If I install it in my site root directory when I log in I see nothing but a blank screen….

    Hmmm… I don’t know if this might help you but I’m running Abyss Web Server on my pc.

    For me, I’d to create a folder called “scripts” and install PhpMyAdmin into that folder. However, the procedure might vary for you. So, you should look up the relevant documentation for your server.

    Wow, unplugnow, your writeup saved my butt. Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘link_count error after upgraded to v2.1.3’ is closed to new replies.