How to upgrade user as Admin from database in WordPress ?

Sometime we don't have option to change the user level from admin panel. In this case we need to change it from database. For this you need to edit the user meta table. 

For updating user role you need to have user id, then you need to access wp_usermeta table.

In wp_usermeta table, you can find wp_capabilities under meta_key. And find wp_capabilities with same user id for which you want to update.

wp_capabilities meta_value should be a:1:{s:13:”administrator”;b:1;} 

Also wp_user_level meta_value should be 10. 10 is for highest user level. 

Please check the screenshot below how's it looks:

Upgrade User from database in WordPress