28 Jun 2020
How to install mongoDB on local
Cara installasi mongoDB ke PC local
MongoDB is a modern and popular databased with no SQL, very fast to using for your project . if you interest and need to try you can try mongodb clouds or download mongoDB on your local server pc, for clouds you can try now →
But how install it on your local mcahine like PC deskotp or laptop ?? for the first you need download mongoDB installer donwload here →, after download you can run installation, click next and finished. when installation is finish you can create new folder and rename with data and then double click on data create new folder and rename it with db on local disck C:.
After that you can run on npm or cmd where .exe file location, i recomended use git bash for using shell terminal CLI. if you dont have git bash you can download git now →
Open folder on C:\Program Files\MongoDB\Server\4.2\bin and right click select git bash here , and then git terminal is open now. For first you must run the command
after that you can run this command
now configure and run command
for insert this you must know about version of mongodb your use in my case i using 4.2, and then insert this code on your configure.
and copy this code now
alias mongod=""/c/Program\ files/MongoDB/Server/4.2/bin/mongod.exe""
alias mongo=""/c/Program\ Files/MongoDB/Server/4.2/bin/mongo.exe""
after insert code you can click ESC button, and then insert code
And the display like this
Now restart your GIT bash terminal, and open again.
Test with run
If success the terminal infrom about mongo db, and if failed or eror installtion mongoDB is maybe trouble with your PATH on ENV enviroment variables on windows.
Now how to we solved this problem ??? don't wory.. you have try it on Visual Code Studio terminal , if you dont have VS code download here →
Now open VS code and then click open the terminal and test run mongo --version.
And congrats.... now you success for MongoDB installation - cara installasi mongoDB
Now how to connected with mongodb database and create first database?? click here →