Skip to content

Instantly share code, notes, and snippets.

@TXDynamics
Created April 24, 2013 13:24
Show Gist options
  • Select an option

  • Save TXDynamics/5452096 to your computer and use it in GitHub Desktop.

Select an option

Save TXDynamics/5452096 to your computer and use it in GitHub Desktop.
Sample MySQL Ruby database.yaml file
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
# If you get errors from about yaaml most likely you have bad spaces
# or indenting within your file
# To create a new rails site that is using my sql instead of sqlite
# You have to run this rails command 'rails new MyApp --database=mysql'
development:
adapter: mysql2
database: rubyappdev
username: root
password: dsneptune1
sochost: localhost
test:
adapter: mysql2
database: rubyapptest
username: root
password: dsneptune1
sochost: localhost
production:
adapter: mysql2
database: rubyapp
username: root
password: dsneptune1
sochost: localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment