1 安装:https://blog.csdn.net/CC_leather/article/details/105051719#_6 2 使用: show dbs # 显示所有数据的列表 db # 显示当前数据库对象或集合 use admin # 连接到一个指定admin的数据库。 3 数据库名字 ...
分类:
数据库 时间:
2020-06-12 14:23:55
阅读次数:
48
// 引入mongoose 第三方模块 const mongoose = require('mongoose'); // 连接数据库 mongoose.connect('mongodb://localhost/blog', { useNewUrlParser: true, useUnifiedTop ...
分类:
其他好文 时间:
2020-06-12 14:13:49
阅读次数:
67
在https://kubernetes.io/blog/2017/01/running-mongodb-on-kubernetes-with-statefulsets/ 基础上添加了密码认证,与解决提示权限mongo-sidecar提示权限错误问题 制作mongodb镜像(由于keyfile直接挂载 ...
分类:
数据库 时间:
2020-06-12 12:51:47
阅读次数:
184
作者:我叫刘半仙 https://my.oschina.net/liughDevelop/blog/1786631 线上服务器用的是某云的,欢快的完美运行着Tomcat,MySQL,MongoDB,ActiveMQ等程序。突然一则噩耗从前线传来:网站不能访问了! 此项目是我负责,我以150+的手速立 ...
分类:
其他好文 时间:
2020-06-12 11:05:33
阅读次数:
115
import pymongo myclient = pymongo.MongoClient('mongodb://localhost:27017/') mydb = myclient['mongodb'] mycol = mydb['sites'] # 添加 # # mydict = {'name' ...
分类:
数据库 时间:
2020-06-11 21:46:49
阅读次数:
70
1、mongodb是什么? MongoDB 是由 C++语言编写的,是一个基于分布式文件存储的开源数据库系统。 在高负载的情况下,添加更多的节点,可以保证服务器性能。 MongoDB 旨在给 WEB 应用提供可扩展的高性能数据存储解决方案。 MongoDB 将数据存储给一个文档,数据结构由键值(ke ...
分类:
数据库 时间:
2020-06-11 21:40:45
阅读次数:
75
mongodb中如果使用两个$or查询,如下方式是错误的 { $or : [{ "creatorId" : 1888 }, { "workerId" : 1888 }, { "guardianId" : 1888 }] ,$or:[{jobName: "19100901"},{jobAreaName ...
分类:
其他好文 时间:
2020-06-11 16:33:53
阅读次数:
61
[官网]下载mongodb-linux-x86_64-rhel62-3.4.3.tgz 通过FTP(WinSCP,FileZilla等)工具上传到“/apps”目录 使用解压命令解压到当前目录 tar -zvxf mongodb-linux-x86_64-rhel62-3.4.3.tgz 开启270 ...
分类:
数据库 时间:
2020-06-11 16:19:28
阅读次数:
53