https://www.wpkube.com/work-wordpress-database-11-useful-sql-queries/
- Change Your WordPress Password
Forgotten your password and locked yourself out of your WordPress site? No worries – you can reset it manually in the database with this SQL query:
UPDATE wp_users SET user_pass = MD5( '[new_password]' ) WHERE user_login = '[username]';
MD5 encrypts the new password so anyone gaining access to the database is not able to read the password.