0
0
MongoDBquery~20 mins

MongoDB installation and setup - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
MongoDB Setup Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:00remaining
Understanding MongoDB default port
What is the default port number MongoDB server listens on after installation?
A27017
B3306
C8080
D5432
Attempts:
2 left
💡 Hint
Think about the standard port MongoDB uses, different from MySQL or PostgreSQL.
query_result
intermediate
1:30remaining
Check MongoDB service status command output
After installing MongoDB on a Linux system, you run systemctl status mongod. What output indicates the service is running correctly?
AActive: inactive (dead)
BActive: active (running) since ...
CFailed to start mongod.service: Unit not found.
DActive: activating (start) since ...
Attempts:
2 left
💡 Hint
Look for the word that means the service is currently working.
📝 Syntax
advanced
1:30remaining
Correct command to start MongoDB manually
Which of the following commands correctly starts the MongoDB server manually on a Linux system?
Asudo systemctl start mongod
Bsudo mongod --start
Cmongod start
Dservice mongod run
Attempts:
2 left
💡 Hint
Use the standard Linux service manager command.
🔧 Debug
advanced
2:00remaining
Troubleshooting MongoDB connection error
You installed MongoDB and started the service, but when running mongo shell, you get Failed to connect to 127.0.0.1:27017. What is the most likely cause?
AMongoDB is listening on port 3306
BFirewall is blocking port 5432
CMongo shell command is misspelled
DMongoDB service is not running
Attempts:
2 left
💡 Hint
Check if the server process is active before connecting.
optimization
expert
2:30remaining
Optimizing MongoDB startup for production
Which startup option improves MongoDB performance by enabling journaling and limiting memory usage?
Amongod --journal --cacheSize 8GB
Bmongod --nojournal --cacheSize 4GB
Cmongod --journal --wiredTigerCacheSizeGB 2
Dmongod --nojournal --wiredTigerCacheSizeGB 1
Attempts:
2 left
💡 Hint
Journaling helps data safety; cache size controls memory use.