Reset a Drupal admin password

In MySQL:

mysql -u root -pPassword -h localhost

mysql> use databasename;

update users set pass=md5(‘admin’) where uid = 1;