Why can't I log in anymore when I change primary site manually in database? Because of a bug (https://github.com/craftcms/cms/issues/7657), I got locked out from admin because no site seemed to be marked as primary in the DB, even though one of the site files clearly had a primary:true setting.
This is using latest craft as of writing, 3.6.9.
Changing the primary site directly in the sites-table will cause the problem (WEIRD!), logging me out and refusing to log me in again. This doesn't happen in my dev environment when switching the primary site, so I'm not sure what's up here...
Craft 3.6.10 is out now with a fix for #7657. Note that the fix is not retroactive, so if you already have multiple sites in your project config YAML with primary: true, you should run php craft project-config/rebuild to fix that.