Faced same issue, my understanding is(it could be wrong)
1. Make sure mongodb is up and running
2. For linux access as sudo and for windows if connecting localhost turning off firewall may help but its not necessary
3. Just type mongo, it will try to connect to localhost by default. You need to specify IP if you are connecting to a remote server. By default test db will be used.