I tried atwellpub’s solution — to no avail. Then I replaced “keymaster” with “administrator” in the bb_capabilities row of wp_usermeta table, but that did not work either. (A random guess, anyway.)
Strange enough, when I re-edited the row and put “keymaster” back in the meta_value, the admin dashboard started letting me in.
It seems like a file rights issue of some sort, but I did not have an .htaccess file anywhere near the installation path.