install mongodb on window 8
Solution 1
thanks for answer Moacy Barros
but problem was not for this because i run all commands in Command Prompt with “Administrative Privileges:”" problem was for mongod.cfg
if mongod.cfg
config by manual in editor this problem solve that we didn't need to do this in window 7 or server 2008
Edit::
in older windows when installing MongoDB < 2.2 that i was tested
. in Configure directories and files
step
echo logpath="C:\Program Files\MongoDB\log\mongo.log" > "C:\Program Files\MongoDB\mongod.cfg"
it make mongod.cfg
for your mongodb but it wasn't make for me in window 8
for that i make it by manual like
logpath=C:\mongodb\log\mongo.log
logappend=true
dbpath = E:\data
Solution 2
Open Command with "Run as Administrator",that solved my problem
Solution 3
For anyone that happens to try to create a mongodb service on Windows 8 and follows the instructions on MongoDB's website AND still is unable to create the service successfully - I've written this post that explains how I got it to work after experiencing problems trying to set the mongo service on my Windows 8 laptop. Hope it helps!
Here are the steps that you really need to follow to create a Windows service for MongoDB in Windows 8:
Installing MongoDB on Windows 8
- Download and install MongoDB. You can download the 32 or 64-bit version from here.
- Make sure you install MongoDB in a folder that you can easily remember, for example: c:\mongodb\
- Add directories c:\mongodb\log and c:\mongodb\data
- Add log file c:\mongodb\log\mongo.log
Creating a Windows service for MongoDB
-
Open your command window and type the following:
cd c:\mongodb\bin\mongod.exe --install --rest -master -logpath=c:\mongodb\log\mongo.log
Open the registry settings, press the Windows key and R at the same time and then type regedit in the Run command window.
Go to HKEY_LOCAL_MACHINE >> SYSTEM >> CurrentControlSet >> services
-
Find out MongoDB directory & edit ImagePath key Set key value as:
C:\mongodb\bin\mongod --service --rest --master --logpath=C:\mongodb\logs\mongo.log --dbpath=C:\mongodb\data
Save and exit registry editor.
Open Services by pressing the Windows key and R at the same time and then type services.msc in the Run command window and click OK.
Find the MongoDB service and right-click on it, select Properties
Make sure the service is set to start automatically and start the service as shown below.
- Open your browser and go to
http://localhost:28017/
to see if MongoDB is running correctly, you should see a page full of MongoDB details.
Link to this blog post: http://ricardodsanchez.com/2014/09/03/install-mongodb-service-on-windows-8/
Solution 4
error message suggest you don't have admin privileges.
"Run all of the following commands in Command Prompt with “Administrative Privileges:”"
Regards, Moacy
Related videos on Youtube
mohammad mohsenipur
Updated on September 15, 2022Comments
-
mohammad mohsenipur over 1 year
I try to install mongodb on window 8 .
problem is when i want to install mongodb service
C:\mongodb\bin\mongod.exe --auth --config C:\mongodb\mongod.cfg --install
below error accord
Wed Mar 13 19:13:23 Trying to install Windows service 'MongoDB' Wed Mar 13 19:13:23 Error connecting to the Service Control Manager: Access is denied. (5)
how Can I Install Mongodb Service?
-
Sammaye about 11 yearsAre you sure you have administrator privileges on the system?
-
ppeterkaI think this question might be a better fit in superuser.stackexchange.com
-