I am doing a coursera problem where I need to install mongoexpert and mongoimport.
I used the method below but I am getting error. How do I fix this error? Thanks.
first need to Start the mongodb server.
start_mongo
Make a note of the username and password based on the output of the previous command.
Import data in 'diamonds.json' into a collection named 'diamonds' and a database named 'training', replacing the password (the characters following -p: MzA2NDAtcnNhbm5h) with your own password.
mongoimport -u root -p MzA2NDAtcnNhbm5h --authenticationDatabase admin --db training --collection diamonds --file diamonds.json