How to Reinstate Admin Privileges

I accidentally unchecked the admin user group under People for our one admin user and it immediately locked me out. Now nobody can access the admin panel to change the permission back to what it was.

How do I create a new admin account to gain access again or reinstate the admin privileges for the account that was removed?

Depends upon your database, but use the following SQL to find the correct user:.
select * from core_user
It’s the first column you’re interested in. Assuming, it’s user 1, you then use:
Update core_user set is_superuser=1 where id=1
to set them to admin

mysql> use metabase
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> update core_user set is_superuser=1 where email=‘XYZ’;
Query OK, 1 row affected (0.05 sec)
Rows matched: 1 Changed: 1 Warnings: 0

figured it out ^^