会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
linux运维技术
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
25
下一页
2022年1月28日
docker部署nacos单节点并持久化数据库
摘要: #1拉取镜像docker pull nacos/nacos-server:2.0.2docker pull mysql:5.7 #2使用Navicat生产nacos数据库文件cp /root/nacos/conf/nacos-mysql.sql /root/docker/mysql/var/lib/
阅读全文
posted @ 2022-01-28 16:00 linuxTang
阅读(440)
评论(0)
推荐(0)
2022年1月27日
记录docker安装的mongodb远程连接
摘要: 1登录数据库创建远程连接用户 > db.createUser({user: 'alice', pwd: 'a11112222', roles:[{role:'root', db: 'admin'}]}) # 上面的命令表示:在 admin 库(上一步操作以切换至该库)下创建一个 alice 用户,其
阅读全文
posted @ 2022-01-27 21:28 linuxTang
阅读(412)
评论(0)
推荐(0)
2022年1月11日
安装jdk12
摘要: [root@web01_Node1 /server/tools]#tar xf jdk-12.0.2_linux-x64_bin.tar.gz [root@web01_Node1 /server/tools]#mv jdk-12.0.2 /application[root@web01_Node1 /
阅读全文
posted @ 2022-01-11 22:28 linuxTang
阅读(109)
评论(0)
推荐(0)
centos8通过yum安装mysql8
摘要: 安装Yum Repository [root@localhost ~]# wget https://repo.mysql.com//mysql80-community-release-el8-1.noarch.rpm 使用rpm来安装MySQL [root@localhost ~]# rpm -iv
阅读全文
posted @ 2022-01-11 19:00 linuxTang
阅读(498)
评论(0)
推荐(0)
2022MongoDB7-索引
摘要: 在MongoDB中,所有的集合都有一个默认_id索引, 1给createtime创建一个降序排列的索引: db.createIndex({"createtime":-1}) 2查看索引: db.order.getIndexes(); 3创建索引时默认background=false,表示前台创建索引
阅读全文
posted @ 2022-01-11 17:59 linuxTang
阅读(97)
评论(0)
推荐(0)
2022年1月10日
2022MongoDB6-聚合查询参数的用法和删除数据的方法
摘要: 聚合条件筛选$match用法: 对订单金额大于120的数据做分组: #对订单金额大于120的进行分组 #select sum(payment) from table where payment>120 group by title 在mongoDB中 {"$match":{"payment":{"$
阅读全文
posted @ 2022-01-10 21:46 linuxTang
阅读(235)
评论(0)
推荐(0)
2022MongoDB5-分页查询和聚合查询求和
摘要: 一,分页和排序: 1正序排列: 字符串按照字母顺序排列,数字按照大小顺序排列,如果是中文,按照uncode编码值进行排序, db.users.find().sort({"name":1}); 2倒序排列 db.users.find().sort({"name":-1}); 3在所有的结果中过滤出na
阅读全文
posted @ 2022-01-10 16:04 linuxTang
阅读(451)
评论(0)
推荐(0)
2022MongoDB4-find正则等其它用法
摘要: 1查看name包括着3个人的所有数据: $in:可以使用索引,但是$nin不能使用索引,不能使用索引的尽量不用或者少用 > db.users.find({"name":{"$in":["bjsxt","admin","test"]}}); { "_id" : ObjectId("61d93061ad
阅读全文
posted @ 2022-01-10 11:49 linuxTang
阅读(134)
评论(0)
推荐(0)
2022MongoDB3-find用法
摘要: find({})第一个参数条件: 查询逻辑: 1查询一个集合中所有数据,默认显示顺序是按照录入的顺序显示的 db.users.find(); 2显示一条数据,默认只显示自然序的第一条: db.users.findOne(); 3查询name=admin的数据 > db.users.find({"na
阅读全文
posted @ 2022-01-10 10:57 linuxTang
阅读(112)
评论(0)
推荐(0)
2022年1月8日
2022MongoDB2-mongodb的增删改
摘要: 1进入数据库后必须要先认证用户才能继续操作,Mongodb里的集合相当于mysql里的一张表,因此show tables即可查看所有的集合(表),集合里的insertOne()方法表示要往集合里插入一条数据,集合里的insertMany()方法表示要往集合里插入多条数据,find()方法可以查看集合
阅读全文
posted @ 2022-01-08 21:30 linuxTang
阅读(149)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
25
下一页
公告