【问题标题】:Rails3 app tries to connect with incorrect db userRails3 应用程序尝试连接不正确的数据库用户
【发布时间】:2011-02-07 11:52:23
【问题描述】:

我在 site5 上部署了一个基本的 rails3 应用程序。我已经使用 bundler 安装了所有必需的 gem,当我尝试运行 rake db:migrate 或 rake db:schema:load 时,我得到:

# rake RAILS_ENV=production db:schema:load
(in /home/xxx/rails/costfinder)
rake aborted!
Access denied for user 'root'@'localhost' (using password: YES)

我的 config/database.yml 有:

production:
  adapter: mysql2
  database: xxx_costfinder_production
  user: ****
  password: ******
  encoding: utf8
  reconnect: true
  pool: 5
  socket: /tmp/mysql.sock

我不知道为什么 rails 会尝试以 root 身份连接。有什么建议么?我的经验是使用 rails2,这是我第一次尝试使用 rails3 应用程序。

【问题讨论】:

    标签: ruby-on-rails-3


    【解决方案1】:

    Aieeee,这是username,而不是user

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-23
      • 1970-01-01
      • 2020-09-17
      • 1970-01-01
      • 2017-06-28
      • 2014-05-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多