Skip to content

Instantly share code, notes, and snippets.

@scottsbaldwin
Created January 31, 2012 23:51
Show Gist options
  • Save scottsbaldwin/1713960 to your computer and use it in GitHub Desktop.
Save scottsbaldwin/1713960 to your computer and use it in GitHub Desktop.
rails mysql setup
$ gem install mysql2
Set this before running rake db:migrate
$ export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/"
config/database.yaml:
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: DBNAME
pool: 5
username: USERNAME
password: PASSWORD
host: HOST
To run migrations on production, do
$ rake db:migrate RAILS_ENV="production"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment