Administration - I accidentally lost my admin account! What can I do From Online Manual
If you deleted your Administrator account, you will need to register again and run the appropriate query for your SMF version. If you lost your Administrator membergroup and privileges due to a mistake or conversion, you will need to run the appropriate query for your SMF version.
The below queries will add you back as an Administrator on an SMF forum.
Run this query in phpMyAdmin:
UPDATE smf_members SET ID_GROUP = '1' WHERE memberName = 'yourusername'
Run this query in phpMyAdmin phpMyAdmin:
UPDATE smf_members SET id_group = '1' WHERE member_name = 'yourusername'
Alternatively, SMF 2.0 allows you to reattribute posts through the Forum Maintenance section of your Administration Center (Administration Center > Forum Maintenance > Reattribute User Posts). Simply fill in the form using the email or username of the old user, and the username for the user who is to have those posts. This only works for guest posts (remaining posts from deleted members are considered guest posts).