Answers.Body: <p>Sorted, thanks. The keen-eyed of you will notice that there was a space character in the server connection details. Idiot</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-01T12:41:43.580Z
Answers.Text: I'd also suggest you remove the real DB name in future too... :)
Answers.UserDisplayName: Sean Delaney
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-28T16:12:24.403Z
Answers.LastActivityDate: 2014-11-28T16:12:24.403Z
Answers.UserDisplayName: Cole Henley
Body: <p>I'm trying to set up Craft and on deployment to a staging server am getting the following error message:</p>
  
  <blockquote>
    <p>An exception has been thrown during the rendering of a template
    ("Craft can't connect to the database with the credentials in
    craft/config/db.php.") in "_layout" at line 39.</p>
  </blockquote>
  
  <p>The config file in question is posted up at <a href="https://gist.github.com/cole007/f32c7ba984a3d35b1d24" rel="nofollow">https://gist.github.com/cole007/f32c7ba984a3d35b1d24</a></p>
  
  <p>Any thoughts?</p>
  
  <p>Cheers in advance,</p>
  
  <p>Cole</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-28T16:02:54.887Z
Comments.Text: As far as I can see your config looks absolutely fine... could it simply be a DB credential issue for that particular environment?
Comments.UserDisplayName: Steve Abraham
Tags: <config><database><multi-environment><environments>
Title: Multi-environment config issue
ThreadText: # Multi-environment config issue
  
  (Asked by: username_0 on 2014-11-28)
  
  I'm trying to set up Craft and on deployment to a staging server am getting the following error message:
  
  > An exception has been thrown during the rendering of a template
  > ("Craft can't connect to the database with the credentials in
  > craft/config/db.php.") in "\_layout" at line 39.
  
  The config file in question is posted up at <https://gist.github.com/cole007/f32c7ba984a3d35b1d24>
  
  Any thoughts?
  
  Cheers in advance,
  
  username_0
  
  **Tags:** config, database, multi-environment, environments
  
  > **Comments:**
  > **username_1**: As far as I can see your config looks absolutely fine... could it simply be a DB credential issue for that particular environment?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2014-11-28. Score: 1
  
  Sorted, thanks. The keen-eyed of you will notice that there was a space character in the server connection details. Idiot
  
  > **Comments:**
  > **username_2**: I'd also suggest you remove the real DB name in future too... :)  
  
  ---
  
  