Rails3应用程序尝试连接不正确的数据库用户

Jef*_*tte 2 ruby-on-rails-3

我有一个基本的rails3应用程序,我正在site5上部署.我已经使用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)
Run Code Online (Sandbox Code Playgroud)

我的config/database.yml有:

production:
  adapter: mysql2
  database: xxx_costfinder_production
  user: ****
  password: ******
  encoding: utf8
  reconnect: true
  pool: 5
  socket: /tmp/mysql.sock
Run Code Online (Sandbox Code Playgroud)

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

Jef*_*tte 6

Aieeee username,不是user