title: "Connecting to database specified by database.yml" in Rails production
body: <p>I've deployed a Rails 3 app on Ubuntu server and when I open the app in the browser, there's the <strong>500 error</strong> screen and in the logs (<code>production.log</code>) I see following:</p>
  
  <pre><code>...
  Connecting to database specified by database.yml
  Connecting to database specified by database.yml
  Connecting to database specified by database.yml
  Connecting to database specified by database.yml
  Connecting to database specified by database.yml
  Connecting to database specified by database.yml
  Connecting to database specified by database.yml
  </code></pre>
  
  <p>The set up in the <code>database.yml</code> file should be correct:</p>
  
  <pre><code>production:
    adapter: mysql2
    encoding: utf8
    database: myapp_production
    username: rails
    password: mypass
    host: 127.0.0.1
    port: 3306  
    socket: /var/run/mysqld/mysqld.sock
    pool: 5
    timeout: 5000
  </code></pre>
  
  <p>when I try to log in to <code>mysql</code> with the credentials above:</p>
  
  <pre><code>mysql -u rails -p
  </code></pre>
  
  <p>I am successfully authenticated.</p>
  
  <p>The server is from DigitalOcean.</p>
  
  <p>Any tips why I'm seeing this error message?</p>
  
  <p>Thank you!</p>