Cannot connect to mongodb errno:61 Connection refused

It can happen when the mongodb service is not running on the mac. To start it, I tried

brew services start mongodb

and it worked.

Edit: According to the discussion on this PR on homebrew: https://github.com/Homebrew/homebrew/issues/30628

brew services is deprecated, I looked around on SO and found these answers now answer the question: What is the correct way to start a mongod service on linux / OS X?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)