How to 'drush sql-dump' all databases
If your database connection on settings.php looks like

$databases = array(
  'default' =&gt;
  array(
    'default' =&gt;
    array(
      'database' =&gt; 'mydatabase1',
      'username' =&gt; 'root',
      'password' =&gt; 'root',
      'host' =&gt; 'localhost',
      'port' =&gt; '',
      'driver' =&gt; 'mysql',
      'prefix' =&gt; '',
    ),
  ),
  'test' =&gt;
  array(
    'default' =&gt;
    array(
      'database' =&gt; 'mydatabase2',
      'username' =&gt; 'root',
      'password' =&gt; 'root',
      'host' =&gt; 'localhost',
      'port' =&gt; '',
      'driver' =&gt; 'mysql',
      'prefix' =&gt; '',
    ),
  ),
);


The following command will back up both the data bases;

drush sql-dump --database=default --result-file=default.sql; drush sql-dump --database=test --result-file=test.sql