$ rails new [アプリ名] -d mysql

root/config/database.yml

development:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: [アプリ名]_development
  pool: 5
  username: root
  password:
  host: localhost

test:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: [アプリ名]_test
  pool: 5
  username: root
  password:
  host: localhost

production:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: [アプリ名]_production
  pool: 5
  username: root
  password:
  host: localhost