Backup Command:
# mongodump -h 127.0.0.1:27229 -u root -p pw123456 –authenticationDatabase admin -o /data/backup/mongoDB |
Error Messages:
Failed: error getting collections for database `admin`: error running `listCollections`. Database: `admin` Err: not authorized on admin to execute command { lcursor: {}, $readPreference: { mode: “secondaryPreferred” }, $db: “admin” } |
Solution:
> use admin
> db.auth("root","pw123456")
> db.grantRolesToUser ( "root", [ { role: "__system", db: "admin" } ] ) #Grant the admin user permission to execute commands on the system.version table
Read More:
- Robo3T Remote Connect MongoDB Error: Failed to refresh ‘Collections‘. Error: ListCollections failed
- DM backup database Error: [-7169]:bakres failed to communicate with DMAP message.
- [Solved] MongoDB Update User Error: Error: not authorized on admin to execute command
- [Solved] C# Access Mongodb Database Error: command find failed: Command find requires authentication
- Mongodb error: authentication failed [How to Solve]
- [Solved] MongoDB Error: FaileError: dToParse: Password must be URL Encoded for mongodb:// URL:
- [Solved] Springboot Connect MongoDB Error: UncategorizedMongoDbException: Command failed with error 13 (Unauthorized)
- MAC-XXL_JOB Error: Failed to create parent directories for [/data/applogs/xxl-job/xxl-job-admin.log
- [Solved] mongodb Startup Error: ERROR: child process failed, exited with error number 14
- [Solved] Failed to register: Error: Failed to get admin…. run enrollAdmin.js
- [Solved] Exception while doing past iteration backup
- Mongodb Crash Error: Too many open files [How to Solve]
- Creating test database for alias ‘postgres’… Got an error creating the test database: permission
- [Solved] Android Room: Database Common Error ‘missing database’
- [Solved] MongoDB Error: TypeError: Object of type ObjectId is not JSON serializable
- How to Solve SpringBoot MongoDB MongoAutoConfiguration Startup Error
- dubbo 2.5.4-SNAPSHOT dubbo-admin [How to Solve]
- MacOS Mojave uses SMB LAN share as backup disk of timemachine time machine. Disk does not support time machine backups. (error 45)
- Springboot running shows application run failed [How to Solve]
- Mybatis Connect Database Error: Error querying database. Cause: java.sql.SQLException: The server time zone value..