Steps to reset the wordpress admin login in database
Login to the server and get into the “public_html” folder of the server.
Then execute the following commands :
Then execute the following commands :
> vi wp-config.php
See what is the database used by the wordpress and quit that “:q!”.
> mysql
> use “database”; ( database = name of the database )
> show tables;
> desc wp_users;
> select ID,user_login,user_pass from wp_users;
For changing the username :
> update wp_users set user_login=’username’ where ID=1;
For changing the Password :
> update wp_users set user_pass=md5(‘password’) where user_login=’username’
Have a nice day 🙂