title: Database connection to remote machine in ruby on rails
body: <p>Here is strange problem.</p>
  
  <p>databse server ip : 170.2.14.131 </p>
  
  <p>application server ip : 170.2.14.137</p>
  
  <p>Application is on cloud server. Database server is on another instance
  and application hosted on different instance.</p>
  
  <pre><code>production:
    adapter: mysql
    database: database_name
    username: ************
    password: ************
    host: 170.2.14.131
  </code></pre>
  
  <p>This is my database.yml configuration for production environment.</p>
  
  <p>Now when i am  trying to connect through my application it's using
  application server IP instead of remote databse IP.</p>
  
  <p>Please suggest.</p>