I had this problem (on WP 2.01) after changing my database prefix from ‘wp_’ to something else. In addition to renaming all of my tables, I had to update entries in both the usermeta and options tables. Here are the statements, assuming that I’ve changed the table prefix from ‘wp_’ to ‘x_’.
mysql> update x_options set option_name = 'x_user_roles' where option_name = 'wp_user_roles';
Query OK, 1 row affected (0.00 sec)
mysql> update x_usermeta set meta_key = 'x_capabilities' where meta_key = 'wp_capabilities';
Query OK, 2 rows affected (0.25 sec)
mysql> update x_usermeta set meta_key = 'x_user_level' where meta_key = 'wp_user_level';
Query OK, 2 rows affected (0.00 sec)