Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mongoexport "ERROR PARSING URI" error - MONGODB

Facing below error while executing mongoexport command.Connection string below.

MongoDB shell version v4.2.0
OS - Mac OS Catalina

mongoexport --uri="mongodb+srv://m001-student:m001-****@sandbox.*****.mongodb.net/sample_supplies" --collection=sales --out=sales.json

Error:

2021-01-14T20:27:59.584+0000    error parsing command line options: error parsing uri: lookup _mongodb._tcp.sandbox.*****.mongodb.net on 192.#.#.#:#:# no such host <br/>


2021-01-14T20:27:59.585+0000    try 'mongoexport --help' for more information

I have provided ACCESS FROM ANYWHERE IP details in network access tab too. In that case, there should not be any issues while connecting. I have installed home-brew in my MacOS and installed mongodb database tools, since my terminal didn't recognise mongoexport command initially. Please let me know if I'm missing any detail in connection string.

like image 617
user23062 Avatar asked Oct 19 '25 14:10

user23062


1 Answers

delete "+srv" from uri...

like image 134
Antonino pecoraro Avatar answered Oct 22 '25 02:10

Antonino pecoraro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!