Shut down server with the following error

MongoDB Enterprise > show dbs
admin 0.000GB
config 0.000GB
local 0.000GB
MongoDB Enterprise > mongo admin --port 30000 --eval ‘db.shutdownServer()’
2019-02-17T01:03:38.875+0000 E QUERY [thread1] SyntaxError: missing ; before statement @(shell):1:6

You are already connected to Mongo shell
Please exit and run at os prompt

1 Like

Don’t exist, just type db.shutdownServer() at in the mongo shell.

1 Like

What they said :slight_smile: Either run the mongo shell command from the Linux shell, or MongoDB commands inside the mongo shell. But you can’t mix them, back and forth :slight_smile: