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';
After that, Drush works on my 8.6.11 drupal site. However, on Drupal 8.7.1, I get the following exception when running almost all commands.
In bootstrap.inc line 212:
The configuration directory type 'sync' does not exist
drush cr works fine.
Do I have to create some new directories? May it be connected to the fact that in Drupal 8.7.1 there is no longer a web sub-directory in root?