Skip to content

auth error using mechanism SCRAM-SHA1 while exporting via mongoexport

By default, mongoexport uses authSource=admin. You can resolve the issue by adding –authenticationDatabase=admin to the export command.

Source MongoDB – mongoexport

Updated command

mongoexport --host <HOST> --port <PORT> -u <USER> --db <DB> -c <COLLECTION> --out <EXPOR_FILE_PATH> --authenticationDatabase=admin
Published inGenel
© 2024 M.Sertaç Bayır - All Rights Reserved