MongoDBを導入!しかし...
公式のMacOS版のインストールガイドに沿って進めていくが...
2020-02-22T06:19:45.373+0900 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:341:17
@(connect):2:6
2020-02-22T06:19:45.375+0900 F - [main] exception: connect failed
2020-02-22T06:19:45.375+0900 E - [main] exiting with code 1
のエラーが発生。色々記事を検索したところ
こちらの記事の内容で解決しました。
$ rm /tmp/mongodb-27017.sock
$ brew services restart mongodb-community
Stopping `mongodb-community`... (might take a while)
==> Successfully stopped `mongodb-community` (label: homebrew.mxcl.mongodb-community)
$ mongo
MongoDB shell version v4.2.3
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
MongoDB server version: 4.2.3
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
>
起動した!