mongodb data can be displayed in the client, but the reason does not work linux command line is turned mongodb user name and password authentication, if authentication is turned on, the connection is required using the following method:
1. When a client connects, specify a user name, password, db name
mongo --port 27017 -u user name -p password --authenticationDatabase "admin"
2. After the client is connected, and then verified. 1 shows the output verification is successful. Then you can execute other commands