Mongodb shell connection

  mongodb, question

MongoDB was installed today./Mongo
clipboard.png

Why can’t you use the command line? for example: show dbs;

It seems that you arerpmInstalled? Did you start the server first?

netstat -pln | grep mongod

If not, start:

sudo service mongod start

In addition, we still need to see if you report any errors after executing the shell like this. If there is an error message to come out.