3

when I connect to a mongodb server through shell I will get below output:

MongoDB shell version v3.4.0
connecting to: mongodb://localhost/admin
MongoDB server version: 3.4.0-rc4
Server has startup warnings:
2017-08-07T09:45:19.112+0900 I CONTROL  [main] ** WARNING: You are running this process as the root user, which is not recommended.
2017-08-07T09:45:19.112+0900 I CONTROL  [main]
>

How can I diable these message and just show the prompt? Do I need to disable it in mongo-shell or mongodb server?

Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
  • Umm [`--quiet`](https://docs.mongodb.com/manual/reference/program/mongo/#cmdoption-quiet) It's actually in the manual and in many answers here. I don't think it does or "should" suppress the warnings though. You really should not be running the shell as `root`. Apparently it does suppress the warnings. – Neil Lunn Aug 09 '17 at 12:06
  • 4
    `--quiet` should be set on mongo shell which is client side. Whether I can do it on the server side? – Joey Yi Zhao Aug 14 '17 at 00:20

0 Answers0