I wanted to connect to a remote MySQL host (with rake db:create), but Rails always considers it to be local. Database.yml which uses the following config: defaults: &defaults encoding: unicode adapter: mysql username: <username> password: ************* port: 3306 host: <remote ip address> development: <<: *defaults database: <db name> test: &test <<: *defaults database: <db name> production: <<: *
![Problems connecting to remote MySQL host with Rails](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)