mongodump 報錯:errmsg: "Auth mechanism not specified

mongodump 報錯

assertion: 2 { ok: 0.0, errmsg: "Auth mechanism not specified", code: 2, codeName: "BadValue", operationTime: Timestamp 1573815888000|1, $clusterTime: { clusterTime: Timestamp 1573815888000|1,mongodb

緣由

mongodump 版本較低致使的,須要卸默認yum源安裝版本版本,從新安裝新版本。ide

系統默認安裝版本:2.x
需求版本(支持集羣版本):4.xurl

解決辦法:

建立文件

/etc/yum.repos.d/mongodb-org-4.0.repo

[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc

安裝配置

yum install -y mongodb-org
相關文章
相關標籤/搜索