SQL to change Drupal 6 password directly in database

Need to change a Drupal 6 user password in your database using the command line or a tool like PhpMyAdmin or MySQL Workbench?  Use SQL like this:

update `users` set `pass` = MD5('NewPassword') where `uid` = 1;

or

update `users` set `pass` = MD5('NewPassword') 
where `mail` = 'useremailaddress';

In the first case I’m updating the password for the Drupal user whose uid is 1, and I’m making their new password ‘NewPassword’.

In the second case I’m updating the password for the Drupal user whose email address is ‘useremailaddress’, and I’m making their new password ‘NewPassword’.

Linode over AWS, GAE, DreamHost, GoDaddy

Need fast SSD hosting, root access, 1 GB of RAM? with speedy support? Then I recommend Linode.

I have used Amazon’s EC2, GoDaddy, DreamHost, Google App Engine, and others for deploying my applications. But Linode is the one I recommend. Stable, fast, reliable, great support, cost-effective. Highly Recommended!