I am using mongoDB and am curious to whether you can import scripts like you can in MySQL:
mysql -uuser -ppassword database < script.sql
Can you do this with mongoDB?
Cheers
Eef
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can pass a list of JS files to the mongo JavaScript shell and those will get executed:
You can use the normal mongo command line arguments if you need to specify a specific db, username, or password like you do in your above example.