Reset password using drush

This commands will be help you to reset the admin password of your site.

# Provide you a login link
drush uli
# Set the password for any user
drush upwd admin –password=”new password”

One more way :

cd php scripts/ 'drupal'

This will generate a hash for you, copy and paste in below queries.

drush sql-cli
update users set name='admin', pass='Hash generated from above command' where uid=1;

Install Drupal From Command Line

If you are using drupal, you must have heard of drush, if not check it now, its the one of the awesomest thing in drupal.More links

1. Project page on drupal.

2. Documentation : how to install

Now i suppose you have drush installed on your system. So you can install drupal in three easy steps.

1. Drush dl drupal

2. mv drupal-7.x your_site_name && cd your_site_name

3.drush si --db-url=mysql://mysql_username:password@ --account-name=you_choose --account-pass=you_choose --account-email=your_email --locale=pt_br --site-name="Drupal Test"