“try ‘mongoimport --help’ for more information”
“error parsing command line options: error parsing uri: unescaped @ sign in user info”
I am new to learning database & I want to import my "Json " file on MongoDB-Atlas . but after using the command line tools below:
"mongoimport --uri mongodb+srv://gofood:Punit@123@cluster0.26lagzl.mongodb.net/myfood --collection sample --type jsonArray --file “C:\Users\Punit\Desktop\Food-App\foodData2.json”
How to solve this ? thanks in Advance
It is syntax issue
Enclose the connect string after --uri till your /dbname in double quotes and try again
1 Like
This Would Happen after i Use the double quotes.
Your password is having special character @ and shell interprets it differently
Escape the special character or use URL encoder or change your password to a simple one
Search our forum threads.You will get more details
3 Likes
Sir, I had changed the passwrd but still it throws error.
Remove quotes from file path and try again
If you still face issues cd to the dir where your json file is residing and run mongoimport from that location.Just give filename without path as parameter for --file
1 Like
Thankyou for your support ,…