How do I change the port MongoDB listens on to avoid error 1067?

Responsive Ad Header

Question

Grade: Education Subject: Support
How do I change the port MongoDB listens on to avoid error 1067?
Asked by:
64 Viewed 64 Answers

Answer (64)

Best Answer
(249)
Edit the `mongod.conf` file and locate the `port` setting. Change the value to an unused port number (e.g., 27018). After saving the changes, restart the MongoDB service. Remember to update any application connection strings to reflect the new port.