无法运行rake db:migrate - MySQL中用户'root'@'localhost'的访问被拒绝

时间:2014-02-16 17:26:41

标签: mysql ruby-on-rails

我正在使用mySQL和Rails 3.2,我遇到了这个问题:错误代码是:“rake aborted!用户'root'@ localhost'访问被拒绝(使用密码:NO)”

我特别确定我的database.yml配置正确,如下所示:

development:
  adapter: mysql2
  encoding: utf8
  database: simple_cms_development
  pool: 5
  username: simple_cms
  password: my_actual_password
  socket: /tmp/mysql.sock

我很困惑,因为错误表示访问被用户'root'@'localhost'拒绝。现在我无法运行任何命令,如rake,rake db:migrate。

我在Stackoverflow上遇到了类似(Why my rake db:migrate throws error message?)的其他类似问题,但答案并没有解决我的问题。

0 个答案:

没有答案