After having istalled drush via composer locally I had to make the following changes inside sites\default\settings.php for it to work:
create the database connection array:
$ databases['default']['default'] = array ( 'database' => 'Drupal', 'username' => 'root', 'password' => '', 'host' => 'localhost', 'port' => '33067', 'driver' => 'mysql', 'prefix' => '', 'collation' => 'utf8mb4_general_ci',
- add the following line:
$ settings[‘hash_salt’] = ‘CHANGE_THIS’;
and after that drush works on my 8.6.11 drupal site. However on new 8.7.1 installation after following the above described steps I get the following exception when running almost all commands:
In bootstrap.inc line 212:
The configuration directory type ‘sync’ does not exist
Strangely enough drush cr works OK.
Do I have to create some new directory? May it be connected to the fact that in 8.7.1 there is no longer a ‘web’ subdirectory in root?