我不熟悉 Ruby on Rails,但有人要求我将 RoR 应用程序从一台服务器移动到另一台服务器。除了我在 log/production.log 中得到这个日志条目之外,这一切似乎都有效:
Mysql2::Error (Access denied for user 'root'@'10.0.0.76' (using password: NO)):
但是,在我的 database.yml 文件中,我没有使用 root 用户。这是它的样子:
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: astral
pool: 5
username: some_user_name
password: xyz
host: 10.0.0.76
socket: /tmp/mysql.sock
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
encoding: utf8
reconnect: false
database: astral
pool: 5
username: some_user_name
password: xyz
socket: /tmp/mysql.sock
production:
development
知道我做错了什么吗?