Occasionally I’ll find myself in a situation where I’ll need to manually change the login name on a user. Normally, this is as simple as changing the user_login and user_nicename in the *_users table. Recently I needed to change the login on an account that was also the Super Admin of a WordPress network (multisite). I assumed that the flag for Super Admin was contained in the *_usermeta table. After logging in to verify the account was working, I discovered the account no longer had access to the Network area, and no longer had access to any plugins.
Turns out the flag to denote a Super Admin is actually stored in the *_sitemeta table with a meta_key value of site_admins as a serialized array. Change the value to the revised login name, making sure to adjust the string length to match the new name. Apply the changes (or run the update query) and log back in with the new login name. Everything should be working as expected again!