drush status not showing correct setting from alias file I'm trying to get drush to work with my test environment, which is actually using a separate database.

so here's my alias in aliases.drushrc.php:

 $aliases['local'] = array(
   'root' =&gt; '/my/drupal/root',
   'uri'  =&gt; 'http://localhost',
 );

 $aliases['test'] = array(
   'parent' =&gt; '@local',
   'databases' =&gt; array (
     'default' =&gt; 
     array (
       'default' =&gt; 
       array (
         'database' =&gt; 'test_db',
         'username' =&gt; 'test_user',
         'password' =&gt; 'test_pwd',
         'host' =&gt; 'localhost',
         'port' =&gt; '',
         'driver' =&gt; 'mysql',
         'prefix' =&gt; '',
       ),
     ),
   ),
 );


When I look at the drush site-alias @local and drush site-alias @test the config is read correctly.

When I run drush @test status it gives me the default status.  Notice that the username and db are the default, not my test details.  

 $ drush @test status
  Drupal version                  :  7.14
  Site URI                        :  http://localhost
  Database driver                 :  mysql
  Database hostname               :  localhost
  Database username               :  default_user
  Database name                   :  default_db
  Database                        :  Connected
  Drupal bootstrap                :  Successful
  Drupal user                     :  Anonymous
  Default theme                   :  sporttracks
  Administration theme            :  seven
  PHP configuration               :  /private/etc/php.ini
  Drush version                   :  5.8
  Drush configuration             :
  Drush alias files               :  /my/home/dir/.drush/aliases.drushrc.php
  Drupal root                     :  /my/drupal/root
  Site path                       :  sites/default
  File directory path             :  sites/default/files
  Temporary file directory path   :  /tmp


So the question is: why is the alias not being read?
This is not supported by Drush, as explained in this issue: https://drupal.org/node/1335626

In brief, the database information stored in an alias file is only used for Drush commands such as sql-sync, sql-cli and so on; a Drush alias will never affect the way that Drupal is bootstrapped.  Therefore, Drush core-status will always show you the database info from settings.php, which is where Drupal reads it from.

If you want to force a different database configuration for a given alias, it would be best to use Drupal's multisite feature, and make another settings.php in a sites/test folder.  Then, just specify 'test' as the uri for your alternate alias.  Should work like a charm.  I always prefer to give my local test installations a completely separate copy of the Drupal + contrib code base too, though, in case I want to fiddle with the code on test without interfering with my other local copy's behavior.  Using the multisite feature is fine if this is not a concern for you, though.