how to stop MongoDB from the command line All In One
how to stop MongoDB from the command line All In One
stop mongod
https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes/#stop-mongod-processes
# start
# server
$ mongod --dbpath /System/Volumes/Data/data/db
# stop
$ mongod --shutdown
# Ctrl + C
# kill <mongod process ID>
# Shut down the mongod from the mongo shell using the db.shutdownServer() method as follows:
> use admin
> db.shutdownServer()
https://stackoverflow.com/questions/11774887/how-to-stop-mongo-db-in-one-command/11777141
stop mongodb
https://docs.mongodb.com/manual/reference/command/shutdown
https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes
$ which mongod
# /usr/local/mongodb/bin/mongod
# start
./mongod
# stop
$ db.adminCommand({ shutdown: 1 })
$ db.adminCommand({ shutdown: 1, force: true })
$ use admin
$ db.shutdownServer()
$ mongod --shutdown
$ kill <mongod process ID>
$ kill -2 <mongod process ID>
# WARNING
# Never use kill -9 (i.e. SIGKILL) to terminate a mongod instance.
SIGKILL / 杀人狂
kill -9 PID
https://stackoverflow.com/questions/11774887/how-to-stop-mongo-db-in-one-command
# MacOS PID kill
$ top
env
https://flutter.dev/docs/get-started/install/macos#update-your-path
$ which .zshrc
$ which flutter
# edit $HOME/.zshrc
$ cat $HOME/.zshrc
$ vim $HOME/.zshrc
$ code . $HOME/.zshrc
export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"
$ echo $PATH
# refresh
$ source $HOME/.zshrc
$ echo $PATH
# refresh
$ source $HOME/.zshrc
$ which mongod
$ code .zshrc
export PATH=/usr/local/mongodb/bin:$PATH
$ ps -ef | grep mongod
$ ps -ef | grep mongo
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/xgqfrms-mbp/.oh-my-zsh"
# tree bug
source ~/.bash_profile
# Flutter China
export PUB_HOSTED_URL=https://pub.flutter-io.cn
# flutter PATH & zsh
export PATH="$PATH:/Users/xgqfrms-mbp/Documents/Flutter/flutter/bin"
# mongodb ENV 2020.04.23
export PATH=/usr/local/mongodb/bin:$PATH
# VS Code & zsh bug
# export PATH="\$PATH:/Users/xgqfrms-mbp/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
function code {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code"
else
local argPath="$1"
[[ $1 = /* ]] && argPath="$1" || argPath="$PWD/${1#./}"
open -a "Visual Studio Code" "$argPath"
fi
}
# nvm config
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
refs
MongoDB shell
https://www.cnblogs.com/xgqfrms/p/13320793.html
MongoDB & macOS
https://www.cnblogs.com/xgqfrms/p/9770091.html
refs
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12756111.html
未经授权禁止转载,违者必究!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
2019-04-22 hashChange & url change & QRCode & canvas to image
2019-04-22 Web APP & 弹窗插件
2018-04-22 Nginx & Reverse Proxy All In One