我有一些涉及几个不同程序的复杂问题,包括redmine,MySQL,Ruby,Ruby on Rails等。这是在Windows XP上。
我在这里遵循redmine说明:http://www.redmine.org/projects/redmine/wiki/RedmineInstall
我在第5步。我想输入RAILS_ENV=production rake db:migrate
当我在命令提示符下输入并输入回车时出现错误:“RAILS_ENV”不是命令等等。
所以我把它重新排序为:rake db:migrate RAILS_ENV=production
这似乎工作正常,但我得到以下内容:
C:\redmine-1.2.1>rake db:migrate RAILS_ENV=production --trace
* Invoke db:migrate (first_time)
* Invoke environment (first_time)
* Execute environment
rake aborted!
Access denied for user 'redmine'@'localhost' (using password: YES)
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:620:in `real_connect'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:620:in `connect'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:203:in `initialize'
C:/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:75:in `new'
这是我的database.yml
文件内容:
MySQL(默认设置)。
production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: ****
encoding: utf8
development:
adapter: mysql
database: redmine_development
host: localhost
username: root
password:
encoding: utf8
# 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: mysql
database: redmine_test
host: localhost
username: root
password:
encoding: utf8
test_pgsql:
adapter: postgresql
database: redmine_test
host: localhost
username: postgres
password: "postgres"
test_sqlite3:
adapter: sqlite3
database: db/test.sqlite3
我真的需要一些方向。这几乎就像我的用户/密码有问题。我已将密码更改为不包含“!”或任何其他特殊字符。我有大写和小写字母。
非常感谢任何帮助。
DemiSheep
答案 0 :(得分:2)
那么,您是否已使用database.yml中指定的密码创建了'redmine'mysql用户?
您可以使用mysql客户端连接到此用户吗? (例如mysql -uredmine -pyourmysqlpassword
)
用户是否具有所有必需的权限?