Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I think this is easy but some time you confuse like me and waste your time for trying to get multi database db info, user info, password info. Drush command docmention is not clear how to get multi database info here is simple example
drush sql-connect --database=databasekey
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedDon't see how we could be more clear. Perhaps you didn't think to read the help for sql-connect
Comment #2
asghar CreditAttribution: asghar commentedI had been studied sql-connect help but dont know how to pass argument .
I was tried by different techniques like
drush sql-connect --database 'databasekey',
drush sql-connect --database databasekey
after source code i have passed argument like this
drush sql-connect --database=databasekey
Thanks
Comment #3
jonhattanCommitted a fix in aa96404 to this option's documentation to note a value is required. It is not enforced though. See #1416198: Drush should check for missing values for options that require values (e.g. --sites-subdir).
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedFYI, drush5 has clearer help about how you pass in option values.