LoginSignup
0
1

More than 3 years have passed since last update.

rails db:createでエラー解決 Access denied for user 'root'@'localhost' (using password: YES)

Posted at

rails db:create をすると以下のようなエラーが

% rails db:create
Access denied for user 'root'@'localhost' (using password: NO)
Couldn't create 'TodoApp_development' database. Please check your configuration.
rails aborted!
Mysql2::Error::ConnectionError: Access denied for user 'root'@'localhost' (using password: NO)

database.ymlとmysqlのパスワードが一致していないことが原因らしい
https://qiita.com/naota7118/items/b62d71484e21d6739d68

前回の記事で設定したmysqlのパスワードを
database.ymlに設定し直した

成功

% rails db:create
Created database 'TodoApp_development'
Created database 'TodoApp_test'
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1