Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start mongodb shell?

Tags:

mongodb

I am using MAC and I have successfully logged in to the server and started the server using the following command

./mongod 

then it says

Thu Jul 14 01:50:41 db version v1.6.5, pdfile version 4.5 Thu Jul 14 01:50:41 git version: 0eb017e9b2828155a67c5612183337b89e12e291 Thu Jul 14 01:50:41 sys info: Linux domU-44-23-67-56-32-F5 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_37 Thu Jul 14 01:50:41 [initandlisten] waiting for connections on port 27017 Thu Jul 14 01:50:41 [websvr] web admin interface listening on port 28017 

and after that whatever I write, its just a text. Terminal is not accepting any command. Response says "waiting for connections on port 27017" . What should I do to get rid of this? I also tried command to start the Shell by the following commnad:

./mongo 

but its also a text there. Please help.

like image 544
Developer Avatar asked Jul 14 '11 05:07

Developer


People also ask

How do I manually start MongoDB?

You can start MongoDB from a command line by issuing the mongod command and specifying options. For a list of options, see the mongod reference. MongoDB can also run as a Windows service. For details, see Start MongoDB Community Edition as a Windows Service.


1 Answers

mongo --shell 

will open the shell interface.

https://docs.mongodb.com/manual/reference/program/mongo/

like image 125
shakhawat Avatar answered Sep 22 '22 07:09

shakhawat