Almost all hosting providers provide access to phpMyAdmin – a database control panel.
It is very easy to set a password for any user there. To do this, you need to go to the wp_users table and click “edit” (pencil icon) next to the user whose password you want to change. As a result, you will see this form:
Change the hash code in the user_pass field to the new password. And be sure to specify MD5 for the set value (this way the entered text password will be hashed and WP will be able to “recognize” it later).
Change password – MySQL
You can use an SQL query to set a new password.
The example below shows how to change the WordPress administrator password, knowing his login. Here the new password will be newpass, and the administrator login will be admin:
UPDATE wp_users SET user_pass = MD5('newpass') WHERE user_login = 'admin'
If you suddenly forgot your login, but remember for sure that you were the first user on the blog, which means your ID is 1, then you can reset your password by ID – WHERE ID = 1:
PDATE wp_users SET user_pass = MD5('newpass') WHERE ID = 1;
Or you can change the password knowing the user’s email:
UPDATE wp_users SET user_pass = MD5('newpass') WHERE user_email = 'admin@gmail.com';