Rails 关于 migrate 求助

shangrenzhidao · 2014年03月13日 · 最后由 shangrenzhidao 回复于 2014年03月13日 · 1972 次阅读

我是数据库在另外一台机器上,我写好了配置文件 database.yml,为什么我 执行完 rake db:migrate ENV_RAILS=development 命 令后 日志显示了建表信息,可是为什么偏偏数据库中就没有表呢? 这是我的配置文件


common: &common adapter: mysql2 encoding: utf8 reconnect: true # socket: /var/run/mysqld/mysqld.sock

common settings for any development databases

devel_common: &dev host: 159.226.67.87 username: xxxxx password: xxxxx port: 3307

common settings for all test databases

tst_common: &tst host: localhost username: root password: root

common settings for all integration databases

int_common: &remote host: remote.example.com username: user password: password ####################### development: <<: *common <<: *dev # database: eol_production database: eol_development

development_data: <<: *common <<: *dev # database: eol_data_production

database: eol_data_development development_logging: <<: *common <<: *dev #database: eol_logging_production database: eol_logging_development

############################ test: &test <<: *common <<: *tst database: eol_test

test_data: <<: *common <<: *tst database: eol_data_test

test_logging: <<: *common <<: *tst database: eol_logging_test

############################ integration: <<: *common <<: *remote database: eol_integration

integration_data: <<: *common <<: *remote database: eol_data_integration integration_logging: <<: *common <<: *remote database: eol_logging_production

############################ staging: <<: *common <<: *remote database: eol_staging

staging_data: <<: *common <<: *remote database: eol_data_staging

staging_logging: <<: *common <<: *remote database: eol_logging_production

############################ #for production only #master database connection for rails database master_database: <<: *common <<: *remote database: eol_integration

#master database connection for data database master_data_database: <<: *common <<: *remote database: eol_data_integration

#master database connection for logging database master_logging_database: <<: *common <<: *remote database: eol_logging_production

是否能 ping 通?mysql 是否能远程连接。。。

确定 development 模式下,连接的数据库是远程的数据库

#2 楼 @dingjop 嗯,就是执行完之后没有变化

需要 登录 后方可回复, 如果你还没有账号请 注册新账号