我在开发中使用sqlite3构建了一个rails应用程序。现在我想使用mysql2部署到rackspace,我想知道我需要什么改变。我不想将任何数据从开发环境转移到生产环境。我的database.yml文件如下所示:
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
请告诉我这个文件需要做哪些更改以及我还需要做些什么?
答案 0 :(得分:1)
您希望您的生产数据库看起来像这样:
production:
adapter: mysql2
encoding: utf8
database: name-of-your-mysql2-database-here
pool: 5
username: root
password: your_password