Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add mongoDB service on windows startup?

I am trying to add mongoDB service on windows startup but still I am not able to do it.

Every time i have to start mongoDB service manually.

I have looked into how to add application on startup in windows but it only starts application not service like this

enter image description here

So can you help me to find solution to add mongoDB service to startup in windows so it can automatically starts? Thanks in advance.

like image 698
Aarsh Avatar asked Oct 28 '22 02:10

Aarsh


People also ask

Why MongoDB is not showing in services?

Run the "Services. msc" command and check if the MongoDB service is installed or not. As we didn't install that service during the installation, you will not be able to find it in the Services window. Now, open the command prompt with admin rights as we are going to install or configure a Windows Service for MongoDB.

Should I install MongoDB as a Windows Service?

Running MongoDB as a service gives you some flexibility with how you can run and deploy MongoDB. For example, you can have MongoDB run at startup and restart on failures. If you don't set MongoDB up as a service, you will have to run the MongoDB server every time.


2 Answers

In windows Control Panel\All Control Panel Items\Administrative Tools\Services you can find the MongoDB Database Server service and change it's Startup Type to Automatic.

If no MongoDB Database Server service is listed in the services, you need to install it as MongoDB as a Windows service as described here.

like image 97
SuleymanSah Avatar answered Nov 15 '22 07:11

SuleymanSah


You can check if the MongoDB Server is enabled on the windows services list. You can verify by opening the Run application Windows Key + R and execute the command msconfig. This will open a window, where you can navigate to services and verify if the MongoDB Server box is enabled.

enter image description here.

like image 44
Renan Lopes Avatar answered Nov 15 '22 05:11

Renan Lopes