Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. DBユーザを作った後、rake db:create実行したら下記エラー
  2. ```
  3. rake db:create
  4. Running via Spring preloader in process 12215
  5. Created database 'hoge_development'
  6. Access denied for user 'foo'@'localhost' (using password: NO) # fooはdatabase.ymlのユーザではなくローカルホストのユーザ
  7. Couldn't create 'hoge_test' database. Please check your configuration.
  8. rake aborted!
  9. Mysql2::Error::ConnectionError: Access denied for user 'foo'@'localhost' (using password: NO)
  10. -e:1:in `<main>'
  11. Tasks: TOP => db:create
  12. ```
  13.  
  14. test DBの接続情報を環境変数で設定していたが、環境変数に値を入れていなかったため、
  15. test DBの作成に失敗していた(developmentは固定のユーザとパスワードを入れていた)。
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement