Access denied for user 'root'@'localhost' (using password: YES)
我設置了一個新的環境,其中mysql沒有密碼以及我如何得到此錯誤。我在哪裏改變rails應用程序顯示在瀏覽器中拒絕訪問
'root'@'localhost' (using password: YES)
我的database.yml是展示低於我的數據庫是sample_app
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: mysql2
database: db/development.mysql2
pool: 5
timeout: 5000
database: sample_app
username: root
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
database: db/test.mysql2
pool: 5
timeout: 5000
database: sample_app
username: root
socket: /tmp/mysql.sock
production:
adapter: mysql2
database: db/production.mysql2
pool: 5
timeout: 5000
database: sample_app
username: root
socket: /var/run/mysqld/mysqld.sock
您可能感興趣的相關問題:http://serverfault.com/questions/56120/access-denied-for-user-rootlocalhost-using-passwordno – murgatroid99
顯示您的database.yml –