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.