You just try to start the mongodb by
service mongod start
or
start mongod
And check mongodb process is running by checking
ps aux | grep mongo
You can see the status by
service mongod status
If it is not starting then try to remove the mongod lock file by,
rm /var/lib/mongodb/mongod.lock
Then start the mongodb server again.
Author: Abhilash
Hi, Iโm Abhilash! A seasoned web developer with 15 years of experience specializing in Ruby and Ruby on Rails. Since 2010, Iโve built scalable, robust web applications and worked with frameworks like Angular, Sinatra, Laravel, Node.js, Vue and React.
Passionate about clean, maintainable code and continuous learning, I share insights, tutorials, and experiences here. Letโs explore the ever-evolving world of web development together!
View all posts by Abhilash
If any one using Linux, should also try below steps.
$ sudo rm /var/lib/mongodb/mongod.lock
$ mongod –repair
$ sudo start mongodb
$ sudo status mongodb
$ mongo