When working with a dedicated database server such as MySQL or PostgreSQL, a couple of additional options are needed in order to make everything work. An example and explanation is listed below.

config/database.yml:

development:
  adapter: mysql2
  database: myapp_development
  pool: 20
  encoding: utf8
  username: mydbuser
  password: mydbpassword
  host:  localhost
test:
  adapter: mysql2
  database: myapp_test
  pool: 20
  encoding: utf8
  username: mydbuser
  password: mydbpassword
  host:  localhost
production:
  adapter: mysql2
  database: myapp
  pool: 20
  encoding: utf8
  username: mydbuser
  password: mydbpassword
  host:  mypublichost.com

Adapter sets the adapter type. In the example above mysql2 is used. You must specify the mysql2 gem in your Gemfile in order for this to work. If you want to use PostgreSQL, use the pg gem instead and set the adapter in the config settings to postgresql.

Database specifies the name of the database you wish to use.

Pool specifies the number of simultaneous connections you wish to allow per Ruby Process. The number can be anywhere from 5 to 20.

Encoding is the character set encoding type. Typically best left to UTF8 unless you have other requirements.

The username and password fields specify the credentials to use when connecting to the database server.

The hostname field specifies the hostname of the server you wish to connect to.