[SOLVED] CS MongoDB Setup

$25

File Name: CS_MongoDB_Setup.zip
File Size: 150.72 KB

5/5 - (1 vote)

MongoDB Setup
Install the MongoDB Community Server
https://www.mongodb.com/download-center#community
(Click the Community Server Tab)

Copyright By Assignmentchef assignmentchef

Running MongoDB server
Make sure the /data/db folder exisits.
If it doesnt exist, create the folder and make it writable.
On MAC, from a terminal window, type the following: sudo mkdir -p -m 777 /data/db
On Windows, create the folder C:datadb
Open a terminal window, navigate to the bin folder of the MongoDB installation location, and run the following command to start the MongoDB server.

Running MongoDB client and Setting up Authorized Users
From a different terminal window, navigate to the bin folder of the MongoDB installation location, and run the following command to start the MongoDB client shell.
At the prompt within the client, type the following:
db.createUser(
user: admin_user,
pwd: admin_secret,
roles: [ { role: userAdminAnyDatabase, db: admin } ]
Stop the client that is running in this terminal window (CTRL-C).
Stop the server that is running in the other terminal window (CTRL-C).
Restart the server in the terminal window with the following command:
./mongod auth
Restart the client in the terminal window with the following command:
./mongo -u admin_user -p admin_secret authenticationDatabase admin
At the prompt within the client, type the following:
use cs602db
db.createUser(
user: cs602_user,
pwd: cs602_secret,
roles: [readWrite] }
The client can be stopped at this point. The server needs to be running.

CS: assignmentchef QQ: 1823890830 Email: [email protected]

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS MongoDB Setup
$25