Multi-environment database config being ignored The 'localhost' array is not being recognized. If I add :3307 to the '*' array's server attribute, it works. Here's the contents of my db.php:

return array(

  '*' =&gt; array(
    'server' =&gt; 'localhost',
    'user' =&gt; 'av01759',
    'password' =&gt; '*******',
    'database' =&gt; 'av01759_maltaministries',
    'tablePrefix' =&gt; 'craft',
  ),

  'localhost' =&gt; array(
    'server' =&gt; 'localhost:3307'
  )

);


This a fresh Craft install with no tweaks. Any ideas?
The environment-specific array that Craft uses is determined by the $_SERVER['SERVER_NAME'] variable (usuall your domain name), not the database hostname. Instead of using localhost to trigger the env-specific settings, you should use your domain. Your db.php should looks more like this:

return array(

  // default
  '*' =&gt; array(
    'server' =&gt; 'localhost',
    'user' =&gt; 'av01759',
    'password' =&gt; '*******',
    'database' =&gt; 'av01759_maltaministries',
    'tablePrefix' =&gt; 'craft',
  ),

  // production-specific (use your domain instead of example.com)
  'example.com' =&gt; array(
    'server' =&gt; 'localhost:3307'
  )

);


UPDATE: Since in this case, $_SERVER['SERVER_NAME'] actually is "localhost" for you and I understand you are connecting to a remote db, you could try using this for your db.php (swapped the value for server in my above example, this way you make the exception for production).

return array(

  // default
  '*' =&gt; array(
    'server' =&gt; 'localhost:3307',
    'user' =&gt; 'av01759',
    'password' =&gt; '*******',
    'database' =&gt; 'av01759_maltaministries',
    'tablePrefix' =&gt; 'craft',
  ),

  // production-specific
  'production-site-domain-here.com' =&gt; array(
    'server' =&gt; 'localhost'
  )

);