Challenge - 5 Problems
MongoDB Setup Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:00remaining
Understanding MongoDB default port
What is the default port number MongoDB server listens on after installation?
Attempts:
2 left
💡 Hint
Think about the standard port MongoDB uses, different from MySQL or PostgreSQL.
✗ Incorrect
MongoDB by default listens on port 27017. Ports 3306 and 5432 are for MySQL and PostgreSQL respectively, and 8080 is commonly used for web servers.
❓ query_result
intermediate1: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?Attempts:
2 left
💡 Hint
Look for the word that means the service is currently working.
✗ Incorrect
The status line showing active (running) means MongoDB is running properly. Other statuses indicate stopped, failed, or starting states.
📝 Syntax
advanced1:30remaining
Correct command to start MongoDB manually
Which of the following commands correctly starts the MongoDB server manually on a Linux system?
Attempts:
2 left
💡 Hint
Use the standard Linux service manager command.
✗ Incorrect
The correct way to start MongoDB service is using systemctl start mongod. Other commands are either invalid or incorrect syntax.
🔧 Debug
advanced2: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?Attempts:
2 left
💡 Hint
Check if the server process is active before connecting.
✗ Incorrect
If the MongoDB service is not running, the shell cannot connect to the default port 27017. Ports 3306 and 5432 are unrelated, and the shell command is correct.
❓ optimization
expert2:30remaining
Optimizing MongoDB startup for production
Which startup option improves MongoDB performance by enabling journaling and limiting memory usage?
Attempts:
2 left
💡 Hint
Journaling helps data safety; cache size controls memory use.
✗ Incorrect
Option C enables journaling for data durability and sets WiredTiger cache size to 2GB, balancing performance and memory. Other options disable journaling or use invalid flags.