How to restore the user's access level to administrator in Wordpress?

How to restore ( reset ) permissions ( level ) to administrator user wordpress?

Accidentally changed the user access level to normal and lost access to the site admin?

There is a simple and quick solution to this problem.

1. Go to phpmyadmin and find ID of your admin user in wp_users table

2. Search in table wp_usermeta with condition user_id = ID from first step and with meta_key = wp_capabilities

3. Change meta_value of this row to this one:

a:1:{s:13:"administrator";s:1:"1";}