I just updated to 3.1.3 and now when I go to the admin I get the "Database Update Required" /wp-admin/upgrade.php
screen. I click 'Upgrade Now' and it says it's done, but then trying to access anything in the admin gets me the same screen again. How do I get past this?
EDIT: In trying to use toscho's solution, I discovered that my wordpress db tables are not writable, which likely led to the error loop. Any ideas for how to track that down?