赵走x博客
网站访问量:151867
首页
书籍
软件
工具
古诗词
搜索
登录
2、在MongoDB开启验证的情况下,新建一个数据库 dbName
mac 安装mongodb
mongodb同一个document中两个字段比较查询
mongoengine 关系处理
mongoengine查询
ubuntu安装mongodb(不使用docker)
Centos安装mongodb(不使用docker)
MongoDB唯一索引(Unique) 空值问题
1、mongoengine.errors.InvalidQueryError: Cannot perform join in mongoDB
1、sanic中对motor的操作封装
1、mongodb设置密码后无效,还是可以外网无密码访问
mac 安装mongodb
资源编号:76168
mongodb相关问题
数据库
热度:200
安装、入门
# 1.访问MongoDB官方下载地址 官网地址是:https://www.mongodb.com/download-center?jmp=nav#community # 2、将下载的文件重新命名为mongodb 并且copy到 ~路径下 # 3、打开终端,输入“open -e .bash_profile”,在打开的文件中加入 ``` export PATH=${PATH}:/usr/local/MongoDB/bin ``` # 4、关闭上面的.bash_profile编辑窗口,然后在下图中输入"source .bash_profile"使配置生效。输入"mongod -version" # 5、在根目录下新建 data 文件夹,里面再建一个 db 文件夹,安装MongoDB时并不会自动生成,需要我们手动创建,可以在命令行输入创建,也可以直接在Finder中手动新建 ``` sudo mkdir -p /data/db ``` # 6、打开命令行输入 ``` mongod ``` 启动服务端 如果报下面错误: ``` exception in initAndListen: IllegalOperation: Attempted to create a lock file on a read-only directo ``` 是因为/data权限不足,运行下面语句(mark 是我的计算机用户名): ``` sudo chown -R mark /data ``` # 7、brew安装mongodb: 首先tap一个仓库 ``` brew tap mongodb/brew ``` 安装社区版(商业版没研究~) ``` brew install mongodb-community@4.2 ``` 后面的@4.2省略应该也行,默认安装最新版本。(安装是最新4.2) 官网链接:https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/ 如果报下面错误: ``` curl: (6) Could not resolve host: fastdl.mongodb.org Error: An exception occurred within a child process: DownloadError: Failed to download resource "mongodb-community" Download failed: https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.2.1.tgz ``` 重新运行下面语句: ``` brew install mongodb-community@4.2 ``` # 8、mac开机启动: ``` brew services start mongodb brew services start mongodb-community@4.2 ```