启动mongo The file /Users/mostthe/.bash_profile does not exist.
mostthe@MostdeMacBook-Air ~ % touch .bash_profilemostthe@MostdeMacBook-Air ~ % open -e .bash_profilemostthe@MostdeMacBook-Air ~ % source ~/.bash_profilemostthe@MostdeMacBook-Air ~ % mongoopen -e .bash
mostthe@MostdeMacBook-Air ~ % touch .bash_profile
mostthe@MostdeMacBook-Air ~ % open -e .bash_profile
mostthe@MostdeMacBook-Air ~ % source ~/.bash_profile
mostthe@MostdeMacBook-Air ~ % mongo
open -e .bash_profile 打开后配置:
export PATH="/usr/local/mongodb/bin:$PATH"
中途意外关闭了mongodb,下次进来启动会报错
https://blog.csdn.net/weixin_34901508/article/details/113536713查看这位兄弟的
注意 在访达里快捷键:shift+comma+g 查看自己的地址
这一步的时候export PATH=${PATH}:/private/etc/mongodb-macos-x86_64-5.0.2/bin(这里)
如我的配置的时候要用/private/etc/mongodb-macos-x86_64-5.0.2/bin
还是报错:
1.先进入bin
2.sudo mongod --dbpath=/Users/mostthe/data
3.新建窗口输入先open -e .bash_profile,
再保存export PATH=${PATH}:/private/etc/mongodb-macos-x86_64-5.0.2/bin(根据自己文件夹而定)
最后mongo
更多推荐



所有评论(0)