@Doug_Duncan sir I did same as you said and getting this

and now with mongo I am getting this error

new output of the log file with path - /opt/homebrew/var/log/mongodb/mongo.log

Did you check permissions/ownership of dbpath & logpath directories as Doug_Duncan mentioned above?
Since it was run as root previously they might be owned by root and when you start the service as normal user mongod is not able to write
Your log shows only shutdown related messages none related to startup

This the mongod.conf file

Kindly see the ownership

Please show full path by pwd command
Did you try restart of your service
Also can you spinup another mongod on different port,dbpath,logpath where mongod can write

full path by pwd command

and how can I pinup another mongod?

From command line
mongod --port 29000 --dbpath your_homedir --logpath your_homedir/mongod.log --fork
If it comes up connect by issuing
mongo --port 29000
Please refer to mongo documentation for various command line params

Ok sir let me try and get back to you

@Doug_Duncan sir or @Ramachandra_Tummala sir
kindly refer to this screenshot

This means your mognod process is running and you have successfully connected to it.

Enabling authentication will get rid of the first message.

The second message is informational and I believe that the next time that you connect that message will not show.

The third message just states that you have the mongorc.js file which was created by the older mongo tool. As the note states, you can rename that file to mongosh.js and then that message should go away as well.

Really all of these are just informational messages, although on a production system you will want to enable authentication, but on a test system running on your local machine that will no access to the outside and will not be holding sensitive data, leaving authentication turned off is fine.

From what I can see you have a fully functioning system now. Congratulations! :tada:

1 Like

Thank you, sir, for your help and support if in the future I face any problem I can come back to you right?
Thank you @Doug_Duncan sir and @Ramachandra_Tummala sir

Definitely come back to the forums with any questions you run into while working with MongoDB. You can @ mention me (or Ramachandra I’m sure won’t mind a mention) in a public post, but there are lots of knowledgeable community members here each with their own expertise. That’s the great thing about community, we all get a chance to learn and teach and we all increase our knowledge from every post we read.

1 Like