Mongodb seems to be invisible to Windows 7

188 views
Skip to first unread message

Jim Rutt

unread,
Jan 12, 2016, 4:51:20 PM1/12/16
to mongodb-user
I just downloaded and installed the 64bit mongodb MSI for Windows.  While I can see that it is installed in c:\Program Files, running mongod from the command line produces  result:

'mongod' is not recognized as an internal or external command,
operable program or batch file.

running mongod from c:\Program Files\MongoDB\Server\3.2\bin:

c:\Program Files\MongoDB\Server\3.2\bin>mongod
2016-01-12T10:38:54.907-0500 I CONTROL  [main] Hotfix KB2731284 or later update
is not installed, will zero-out data files
2016-01-12T10:38:54.908-0500 I CONTROL  [initandlisten] MongoDB starting : pid=6
352 port=27017 dbpath=c:\data\db\ 64-bit host=hut-dell-PC
2016-01-12T10:38:54.908-0500 I CONTROL  [initandlisten] targetMinOS: Windows 7/W
indows Server 2008 R2
2016-01-12T10:38:54.908-0500 I CONTROL  [initandlisten] db version v3.2.1
2016-01-12T10:38:54.909-0500 I CONTROL  [initandlisten] git version: a14d55980c2
cdc565d4704a7e3ad37e4e535c1b2
2016-01-12T10:38:54.909-0500 I CONTROL  [initandlisten] OpenSSL version: OpenSSL
 1.0.1p-fips 9 Jul 2015
2016-01-12T10:38:54.909-0500 I CONTROL  [initandlisten] allocator: tcmalloc
2016-01-12T10:38:54.910-0500 I CONTROL  [initandlisten] modules: none
2016-01-12T10:38:54.910-0500 I CONTROL  [initandlisten] build environment:
2016-01-12T10:38:54.910-0500 I CONTROL  [initandlisten]     distmod: 2008plus-ss
l
2016-01-12T10:38:54.910-0500 I CONTROL  [initandlisten]     distarch: x86_64
2016-01-12T10:38:54.910-0500 I CONTROL  [initandlisten]     target_arch: x86_64
2016-01-12T10:38:54.910-0500 I CONTROL  [initandlisten] options: {}
2016-01-12T10:38:54.911-0500 I STORAGE  [initandlisten] exception in initAndList
en: 29 Data directory c:\data\db\ not found., terminating
2016-01-12T10:38:54.911-0500 I CONTROL  [initandlisten] dbexit:  rc: 100

WTF?

Wan Bachtiar

unread,
Jan 12, 2016, 8:19:04 PM1/12/16
to mongodb-user

‘mongod’ is not recognized as an internal or external command,


operable program or batch file.

Hi Jim,

If you would like to execute mongod not from its installation directory, you could add the MongoDB installation bin path to the system environment %PATH% variable.

In Windows 7, you can change the PATH system environment variable by:

  1. Find My Computer, right-click and choose Properties.
  2. In the System Properties (or Advanced system settings), click on the Advanced tab.
  3. In the Advanced section, click on the Environment Variables button.
  4. Find Path under System variables section and click the Edit button.
  5. Add your MongoDB installation directory. The default bin installation directory should be C:\Program Files\MongoDB\Server\3.2\bin. Each different directory is separated with a semicolon (;).
  6. Open a new command line window (PowerShell or DOS prompt), and you should be able to type and run mongod.

There is currently an open ticket in MongoDB JIRA issue tracker to change the Windows msi installer to add MongoDB binaries to the PATH: SERVER-15682. Please feel free to watch or upvote for updates.


running mongod from c:\Program Files\MongoDB\Server\3.2\bin:

en: 29 Data directory c:\data\db\ not found., terminating
2016-01-12T10:38:54.911-0500 I CONTROL [initandlisten] dbexit: rc: 100

After the installation, first you need to set up MongoDB environment. MongoDB requires a data directory to store all data. The default data directory path is C:\data\db, which according to the error message that you are seeing has not been created yet.

See Running MongoDB Community Edition (Windows) for more details.

Kind regards,

Wan.

Reply all
Reply to author
Forward
0 new messages