I just installed Drush 9 on my ubuntu 19 machine. I also downloaded the latest Drupal 7 and 8 to my /var/www/html folder. My mysql is verified working. Is there a quick drush command to help me setup my databases without me having to manually create them for each drupal instance? I have access to my root user if needed.

  • 1
    If you want create database via drush there is command drush sql:create --db-su=root --db-su-pw=rootpassword --db-url="mysql://drupal_db_user:drupal_db_password@" check the documentation here drushcommands.com/drush-9x/sql/sql:create – berramou Jun 27 '19 at 21:51

You can find the docs here: https://drushcommands.com/drush-9x/sql/sql:create/

drush sql:create --db-su=root --db-su-pw=rootpassword --db-url="mysql://drupal_db_user:drupal_db_password@"

It works on drush v8 as drush v9 doesn't support Drupal 7.

Not the answer you're looking for? Browse other questions tagged or ask your own question.