How to reset admin password using drush

If you’re on Drupal 7 use https://github.com/drush-ops/drush/archive/7.x.zip to install Drush

drush upwd --password="jd938pls@l$4401ks" "admin"

MySQL command line:

UPDATE users SET pass = MD5('jd938pls@l$4401ks') WHERE uid=2;

Drush can generate a one-time login link.

drush uli

Then replace “default” with your website URL

To get URL with your domain name instead of default, try it as the following:

drush uli --uri=yourdomainnamehere.com
Read the rest

How to reset forgotten mysql root password

Login server as root and stop/kill mysql processes

Start mysql server with skip-grant-tables

mysqld_safe --skip-grant-tables

mysql

use mysql;
update user set Password=PASSWORD('new-password') where user='root';
flush privileges;

Done!

Now kill mysql processes and restart your mysql server… Read the rest