我有一个基本的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)
我的 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 应用程序。
最佳答案
Aieeee,这是用户名
,而不是用户
关于ruby-on-rails-3 - Rails3 应用程序尝试连接错误的数据库用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4917778/