Reputation: 41
Just installed mongodb community v 6.0.5 on mac using Ventura iOS. This is my first time using mongodb. It installed fine and I can see the version, but when I try running it using the command:
mongod --dbpath ./database
it just prints out the log file...
{"t":{"$date":"2023-05-11T14:45:18.991-06:00"},"s":"I", "c":"CONTROL",
"id":4784929, "ctx":"initandlisten","msg":"Acquiring the global lock for shutdown"}
{"t":{"$date":"2023-05-11T14:45:18.991-06:00"},"s":"I", "c":"-",
"id":4784931, "ctx":"initandlisten","msg":"Dropping the scope cache for shutdown"}
{"t":{"$date":"2023-05-11T14:45:18.991-06:00"},"s":"I", "c":"CONTROL", "id":20565,
"ctx":"initandlisten","msg":"Now exiting"}
{"t":{"$date":"2023-05-11T14:45:18.991-06:00"},"s":"I", "c":"CONTROL", "id":23138,
"ctx":"initandlisten","msg":"Shutting down","attr":{"exitCode":48}}
It's much longer than that but I think you get the idea. My brew is up to date. What can I try differently?
Upvotes: 0
Views: 113
Reputation: 41
I figured it out. When I ran brew services list
my mongodb's status was listed as an 12288 error. Upon further research I learned this means mongodb is already running (which is really confusing) and running the mongo
or mongosh
command in my terminal should bring up the mongo shell. For me, the mongosh
command worked. Not sure how to tell which one will work on what devices, but thankfully there are only two to try from.
Upvotes: 0