Database connection to remote machine

HiAll,

Here is strange problem.

Application is on cloud server. Database server is on another instance
and application hosted on different instance.

databse server ip : xxx.xxx.xxx.xxx
application server ip : yyy.yyy.yyy.yyy

development:
adapter: mysql
database: database_name
username: ************
password: ************
host: xxx.xxx.xxx.xxx

This is my database.yml configuration for development environment.

Now when i am trying to connect through my application it’s using
application server IP yyy.yyy.yyy.yyy instead of remote databse IP
xxx.xxx.xxx.xxx.

Please suggest.