Saturday, September 16, 2017

Drush was not able to start (bootstrap) the Drupal database.

I have struggled lot to resolve "Drush was not able to start (bootstrap) the Drupal database..." issue in Drupal 8. Finally, after burning the midnight oil I have found solution as below.

My laptop configuration: PHP 7, WAMP 3, Windows  7 and 10

The main reason of such issue is PATH variable. You need to add your MySQL and PHP path in system PATH variable. To check, you should close your command shell and restart. It will start using updated PATH variable

In my system, I am having WAMP  3. Path for PHP and MySQL path as below


 Credit goes to

Sunday, September 3, 2017

Resetting Admin password in Drupal 8

Option 1

drush sqlq "select name from users where uid=1"
drush upwd admin --password=pass


Option 2

Generate Password hash

php core/scripts/ 'your-new-pass-here'

Update in database

UPDATE users_field_data SET pass='$S$E5j59pCS9kjQ8P/M1aUCKuF4UUIp.dXjrHyvnE4PerAVJ93bIu4U' WHERE uid = 1;

Update cache

DELETE FROM cache_entity WHERE cid = 'values:user:1';