This is my first attempt at installing Drupal using Composer. I have successfully installed Composer and the Drupal Project template, which comes configured with Drush. To install I use
composer create-project drupal-composer/drupal-project:~8.0 {dir} --stability dev --no-interaction
Next, when I try to install Drupal using Drush with
../vendor/bin/drush site-install --db-url=mysql://{username}:{password}@localhost/{database}
I receive this error
Error: Class 'Drush\Sql\Sql' not found in /Users/.../vendor/drush/drush/src/Sql/SqlBase.php on line 81
I have installed Drush and Composer locally. I have tried requiring drush again after the composer install. I have tried using Drush 9.2.3. SO, If I go through the manual install of Drupal, Drush init does run, but any other command other than version gives me
In Connection.php line 149:
SQLSTATE[HY000] [2002] No such file or directory
I'm using:
- Composer 1.6.5
- Drush 9.3
- Drupal 8.4.5
Class 'Drush\Sql\Sql' not found
indicates that the Drush doesn't understand which driver to use. (Your site-install command looks correct.) Drush is supposed to load the class Drush\Sql\Sql<Driver> - for example Drush\Sql\SqlMysql. Maybe you could run the command with debugging using the "-d" otpion?