Access denied for user 'root'@'localhost' (using password: YES)
mysqlにパスワードがない新しい環境をセットアップし、このエラーが発生する方法を説明します。どこを変更しますか
'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