Skip to content

Instantly share code, notes, and snippets.

@aaronrussell
Created July 8, 2009 17:07
Show Gist options
  • Save aaronrussell/142973 to your computer and use it in GitHub Desktop.
Save aaronrussell/142973 to your computer and use it in GitHub Desktop.
Standard database.yml config file for MySQL-based Rails apps
# Standard database.yml file for MySQL-based Rails apps
# Development and Production environments share defaults
defaults: &defaults
adapter: mysql
encoding: utf8
host: localhost
username: db_username
password: db_password
# Development environment uses Mac OSX mysql.sock location
development:
database: db_development
socket: /var/mysql/mysql.sock
<<: *defaults
# Production environment uses Centos 5 mysql.sock location
production:
database: db_production
socket: /var/lib/mysql/mysql.sock
<<: *defaults
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment