This error message indicates that the user trying to execute a command does not have the necessary permissions to do so on the "config" database.

To resolve this issue, you will need to grant the user the appropriate permissions on the "config" database. You can do this by logging in as a user with administrative privileges and running the following command:

use admin
db.grantRolesToUser("<username>", [{ role: "readWrite", db: "config" }])

Replace <username> with the name of the user you want to grant permissions to. This command will grant the user read and write permissions on the "config" database.

Once you have granted the necessary permissions, the user should be able to execute commands on the "config" database without receiving the "not authorized" error message.

errmsg not authorized on config to execute command

原文地址: https://www.cveoy.top/t/topic/bn3N 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录