How do you use 'drush site-install' to install a multisite with separate databases using a single command?
In the link you provided, @greg_1_anderson mentioned using --sites-subdir. This option is used to create a site folder under &lt;DRUPAL_ROOT&gt;/sites/.

For example, if you run drush si --sites-subdir=example1.com, it will create a example1.com folder under &lt;DRUPAL_ROOT&gt;/sites/, settings.php will also be generated in this folder. It contains the database configuration.

Since it is a multi site structure, you may not want to share the same database. You have to specify the database information with --db-url.

For example:


DB: MySQL
root username: username
root password: password
host: localhost
table name: example


You can specify above information with --db-url=mysql://username:password@localhost/example.

A more complex example involving setting more sites for a multi-site configuration could be the following.

drush si --sites-subdir=example1.com --url=mysql://username:password@localhost/example1
drush si --sites-subdir=example2.com --url=mysql://username:password@localhost/example2


Moreover, if you want to have different database credentials for different sites, you can dynamically create the separate username and password at the same time.

drush si --sites-subdir=example1.com --url=mysql://user1:newpassword1@localhost/example1 --db-su=username --db-su-pw=password
drush si --sites-subdir=example2.com --url=mysql://user2@newpassword2@localhost/example2 --db-su=username --db-su-pw=password