日期:2014-05-16  浏览次数:20438 次

rails 数据库配置
驱动配置:
Gemfile:gem 'mysql2', '0.2.6' 或者
gem install mysql2 --with-mysql-dir=/usr/local/mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
windows 两者均可,linux推荐第二种,给驱动指定部分参数(根据你mysql数据库的安装)  

database.yml配置
development:
   adapter: mysql2   
   encoding: utf8   
   reconnect: false  
   database: xxx
   pool: 5   
   username: xxx
   password: xxx
   host: xxx.xxx.x.xxx