iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >MongoDB日常运维-01常用命令汇总
  • 659
分享到

MongoDB日常运维-01常用命令汇总

2024-04-02 19:04:59 659人浏览 薄情痞子
摘要

MongoDB常用命令汇总(一) ---增,删,改,查 一:增(insert) 二:删(delete) 三:改(update) 四:查(select)  ---连接数

MongoDB常用命令汇总(一)

---增,删,改,查

一:增(insert)

二:删(delete)

三:改(update)

四:查(select) 

---连接数据库

[monGo@cjc bin]$ pwd

/usr/local/mongoDB/bin

[mongo@cjc bin]$ ./mongo --port 27017

---创建新数据库cjcdb和cjctest

MongoDB Enterprise > use cjcdb

---插入数据,才会创建数据库

MongoDB Enterprise > db.tab01.insert({"time":"2018-11-25 18:20"})

MongoDB Enterprise > use cjctest

MongoDB Enterprise > db.tab01.insert({"time":"2018-11-25 18:21"})

---查看有哪些数据库

MongoDB Enterprise > show dbs

...

cjcdb           0.000GB

cjctest         0.000GB

---MongoDB 删除数据库cjctest

MongoDB Enterprise > use cjctest

switched to db cjctest

---查看当前连接的数据库

MongoDB Enterprise > db

cjctest

---删除数据库(谨慎操作)

MongoDB Enterprise > db.dropDatabase()

{ "dropped" : "cjctest", "ok" : 1 }

---MongoDB 创建集合

MongoDB Enterprise > use cjcdb

switched to db cjcdb

MongoDB Enterprise > db.createCollection("tab02")

{ "ok" : 1 }

MongoDB Enterprise > db.createCollection("tab03")

{ "ok" : 1 }

在 MongoDB 中,你不需要创建集合。当你插入一些文档时,MongoDB 会自动创建集合。

MongoDB Enterprise > db.tab05.insert({"id":"123456"})

WriteResult({ "nInserted" : 1 })

MongoDB Enterprise > show collections

tab01

tab02

tab03

tab05

......

================

一:增(insert)

================

插入文档

MongoDB 使用 insert() 或 save() 方法向集合中插入文档:

MongoDB Enterprise > use cjcdb

switched to db cjcdb

MongoDB Enterprise > db

cjcdb

MongoDB Enterprise >

db.tab02.insert({id:1, name:'a'})

db.tab02.insert({id:1, name:'ab'})

db.tab02.insert({id:1, name:'cae'})

db.tab02.insert({id:2, name:'b'})

db.tab02.insert({id:3, name:'c'})

db.tab02.insert({id:4, name:'d'})

db.tab02.insert({id:5, name:'e'})

db.tab02.insert({id:6, name:'f'})

db.tab02.insert({id:7, name:'g'})

db.tab02.insert({id:8, name:'h'})

db.tab02.insert({id:9, name:'i'})

db.tab02.insert({id:10, name:'j'})

db.tab02.insert({id:10, name:'h'})

db.tab02.insert({id:10, name:'i'})

db.tab02.insert({id:10,c100:'h',c200:'f',c300:'业精于勤'})

db.tab02.insert({ccc:10,c10:'h',c20:'f',c30:'行成于思'})

---我们也可以将数据定义为一个变量,如下所示:

MongoDB Enterprise > document=({title: 'blog.itpub', 

...     description: 'chenoracleblog-chenjuchao',

...     by: 'mongo test',

...     url: 'http://blog.itpub.net/29785807/'

... })

MongoDB Enterprise > db.tab02.insert(document)

=================

二:删(delete)

=================

---delete

MongoDB remove()函数是用来移除集合中的数据。

MongoDB数据更新可以使用update()函数。在执行remove()函数前先执行find()命令来判断执行的条件是否正确,这是一个比较好的习惯

MongoDB Enterprise > db

cjcdb

---删除tab02表中id=10的数据

MongoDB Enterprise > db.tab02.find({id:10})

{ "_id" : ObjectId("5bfacc790063f23910737472"), "id" : 10, "name" : "j" }

{ "_id" : ObjectId("5bfacc790063f23910737473"), "id" : 10, "name" : "h" }

{ "_id" : ObjectId("5bfacc790063f23910737474"), "id" : 10, "name" : "i" }

{ "_id" : ObjectId("5bfacc790063f23910737475"), "id" : 10, "c100" : "h", "c200" : "f", "c300" : "业精于勤" }

MongoDB Enterprise > 

MongoDB Enterprise > db.tab02.remove({id:10})

WriteResult({ "nRemoved" : 4 })

---remove() 方法已经过时了,现在官方推荐使用 deleteOne() 和 deleteMany() 方法。

删除 id 等于 1 的第一个文档:

MongoDB Enterprise > db.tab02.find({id:1})

{ "_id" : ObjectId("5bfacc790063f23910737467"), "id" : 1, "name" : "a" }

{ "_id" : ObjectId("5bfacc790063f23910737468"), "id" : 1, "name" : "ab" }

{ "_id" : ObjectId("5bfacc790063f23910737469"), "id" : 1, "name" : "cae" }

MongoDB Enterprise > db.tab02.deleteOne({id:1})

{ "acknowledged" : true, "deletedCount" : 1 }

MongoDB Enterprise > db.tab02.find({id:1})

{ "_id" : ObjectId("5bfacc790063f23910737468"), "id" : 1, "name" : "ab" }

{ "_id" : ObjectId("5bfacc790063f23910737469"), "id" : 1, "name" : "cae" }

---删除 id 等于 1 的全部文档:

MongoDB Enterprise > db.tab02.deleteMany({id:1})

{ "acknowledged" : true, "deletedCount" : 2 }

MongoDB Enterprise > db.tab02.find({id:1})

MongoDB Enterprise > 

---如删除集合下全部文档:

---truncate table ......

MongoDB Enterprise > db.tab02.find()

{ "_id" : ObjectId("5bfacc790063f2391073746a"), "id" : 2, "name" : "b" }

{ "_id" : ObjectId("5bfacc790063f2391073746b"), "id" : 3, "name" : "c" }

{ "_id" : ObjectId("5bfacc790063f2391073746c"), "id" : 4, "name" : "d" }

{ "_id" : ObjectId("5bfacc790063f2391073746d"), "id" : 5, "name" : "e" }

{ "_id" : ObjectId("5bfacc790063f2391073746e"), "id" : 6, "name" : "f" }

{ "_id" : ObjectId("5bfacc790063f2391073746f"), "id" : 7, "name" : "g" }

{ "_id" : ObjectId("5bfacc790063f23910737470"), "id" : 8, "name" : "h" }

{ "_id" : ObjectId("5bfacc790063f23910737471"), "id" : 9, "name" : "i" }

{ "_id" : ObjectId("5bfacc7a0063f23910737476"), "ccc" : 10, "c10" : "h", "c20" : "f", "c30" : "行成于思" }

{ "_id" : ObjectId("5bfaccb10063f23910737477"), "title" : "blog.itpub", "description" : "chenoracleblog", "by" : "mongo test", "url" : "Http://blog.itpub.net/29785807/" }

MongoDB Enterprise > db.tab02.deleteMany({})

{ "acknowledged" : true, "deletedCount" : 10 }

MongoDB Enterprise > db.tab02.find()

MongoDB Enterprise > 

---删除集合

---drop table ......

MongoDB Enterprise > show collections

tab01

tab02

tab03

MongoDB Enterprise > db.tab02.drop()

true

MongoDB Enterprise > show collections

tab01

tab03

===============

三:改(update)

===============

---MongoDB 更新文档

MongoDB 使用 update() 和 save() 方法来更新集合中的文档。

MongoDB Enterprise > db.tab05.find({'id':1})

{ "_id" : ObjectId("5bfafab30063f23910737478"), "id" : 1, "name" : "a" }

{ "_id" : ObjectId("5bfafab30063f23910737479"), "id" : 1, "name" : "aa" }

{ "_id" : ObjectId("5bfafab30063f2391073747a"), "id" : 1, "name" : "aaa" }

---更改符合条件的第一条数据

MongoDB Enterprise > db.tab05.update({'id':1},{$set:{name:'chenjuchao'}})

WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })

MongoDB Enterprise > db.tab05.find({'id':1})

{ "_id" : ObjectId("5bfafab30063f23910737478"), "id" : 1, "name" : "chenjuchao" }

{ "_id" : ObjectId("5bfafab30063f23910737479"), "id" : 1, "name" : "aa" }

{ "_id" : ObjectId("5bfafab30063f2391073747a"), "id" : 1, "name" : "aaa" }

---multi:true更改符合条件的所有数据

MongoDB Enterprise > db.tab05.update({'id':1},{$set:{name:'chenjuchao'}},{multi:true})

WriteResult({ "nMatched" : 3, "nUpserted" : 0, "nModified" : 2 })

MongoDB Enterprise > db.tab05.find({'id':1})

{ "_id" : ObjectId("5bfafab30063f23910737478"), "id" : 1, "name" : "chenjuchao" }

{ "_id" : ObjectId("5bfafab30063f23910737479"), "id" : 1, "name" : "chenjuchao" }

{ "_id" : ObjectId("5bfafab30063f2391073747a"), "id" : 1, "name" : "chenjuchao" }

================

四:查(select)

================

1 (!=)不等于 - $ne

2 (in)包含 - $in

3 (not in) - $nin 不包含

4 (>) 大于 - $gt

5 (>=) 大于等于 - $gte

6 (<) 小于 - $lt

7 (<= ) 小于等于 - $lte

8 模糊查询

9 AND

10 OR 

11 Limit

12 Skip

13 Sort

14 count 

---插入测试数据

---以易读的方式来读取数据,可以使用 pretty() 方法

MongoDB Enterprise> 

db.tab01.insert({name:'a',age:'10'})

db.tab01.insert({name:'ab',age:'10'})

db.tab01.insert({name:'bac',age:'10'})

db.tab01.insert({name:'d',age:'12'})

db.tab01.insert({name:'e',age:'13'})

db.tab01.insert({name:'aaa',age:'14'})

db.tab01.insert({name:'f',age:'15'})

db.tab01.insert({name:'g',age:'16'})

db.tab01.insert({name:'a',age:'17'})

db.tab01.insert({name:'a',age:'18'})

db.tab01.insert({name:'a',age:19})

db.tab01.insert({name:'a',age:20})

---查看全部

MongoDB Enterprise> db.tab01.find()

---加pretty()更易读

db.tab01.find().pretty()

=====

等于

=====

MongoDB Enterprise> db.tab01.find({age:20})

{ "_id" : ObjectId("5bfccbc636850458dff055b0"), "name" : "a", "age" : 20 }

MongoDB Enterprise> db.tab01.find({age:'20'})

MongoDB Enterprise> 

MongoDB Enterprise> db.tab01.find({age:'10'})

{ "_id" : ObjectId("5bfcc7b036850458dff055a5"), "name" : "a", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a6"), "name" : "ab", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a7"), "name" : "bac", "age" : "10" }

MongoDB Enterprise> db.tab01.find({age:10})

MongoDB Enterprise>

====================

1 (!=)不等于 - $ne 

====================

MongoDB Enterprise> db.tab01.find({name:{$ne:'a'}});

{ "_id" : ObjectId("5bfcc7b036850458dff055a6"), "name" : "ab", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a7"), "name" : "bac", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a8"), "name" : "d", "age" : "12" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a9"), "name" : "e", "age" : "13" }

{ "_id" : ObjectId("5bfcc7b036850458dff055aa"), "name" : "aaa", "age" : "14" }

{ "_id" : ObjectId("5bfcc7b036850458dff055ab"), "name" : "f", "age" : "15" }

{ "_id" : ObjectId("5bfcc7b036850458dff055ac"), "name" : "g", "age" : "16" }

{ "_id" : ObjectId("5bfcf37936850458dff055b1"), "name" : "nba", "age" : 21 }

{ "_id" : ObjectId("5bfcf37936850458dff055b2"), "name" : "cba", "age" : 21 }

==================

2 (in)包含 - $in

==================

MongoDB Enterprise> db.tab01.find({name:{$in:['cba','nba']}});

{ "_id" : ObjectId("5bfcf37936850458dff055b1"), "name" : "nba", "age" : 21 }

{ "_id" : ObjectId("5bfcf37936850458dff055b2"), "name" : "cba", "age" : 21 }

=========================

3 (not in) - $nin 不包含

=========================

MongoDB Enterprise> db.tab01.find({age:{$nin:['10','12','13','14','15',21]}});

{ "_id" : ObjectId("5bfcc7b036850458dff055ac"), "name" : "g", "age" : "16" }

{ "_id" : ObjectId("5bfcc7b036850458dff055ad"), "name" : "a", "age" : "17" }

{ "_id" : ObjectId("5bfcc7b136850458dff055ae"), "name" : "a", "age" : "18" }

{ "_id" : ObjectId("5bfccbc536850458dff055af"), "name" : "a", "age" : 19 }

{ "_id" : ObjectId("5bfccbc636850458dff055b0"), "name" : "a", "age" : 20 }

=================

4 (>) 大于 - $gt 

=================

MongoDB Enterprise> db.tab01.find({age:{$gt:'17'}})

{ "_id" : ObjectId("5bfcc7b136850458dff055ae"), "name" : "a", "age" : "18" }

========================

5 (>=) 大于等于 - $gte

========================

MongoDB Enterprise> db.tab01.find({age:{$gte:'17'}})

{ "_id" : ObjectId("5bfcc7b036850458dff055ad"), "name" : "a", "age" : "17" }

{ "_id" : ObjectId("5bfcc7b136850458dff055ae"), "name" : "a", "age" : "18" }

========================

6 (<) 小于 - $lt

========================

MongoDB Enterprise> db.tab01.find({age:{$lt:'12'}})

{ "_id" : ObjectId("5bfcc7b036850458dff055a5"), "name" : "a", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a6"), "name" : "ab", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a7"), "name" : "bac", "age" : "10" }

========================

7 (<= ) 小于等于 - $lte

========================

MongoDB Enterprise> db.tab01.find({age:{$lte:'12'}})

{ "_id" : ObjectId("5bfcc7b036850458dff055a5"), "name" : "a", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a6"), "name" : "ab", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a7"), "name" : "bac", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a8"), "name" : "d", "age" : "12" }

============

8 模糊查询

============

---查询 name 包含"a"的文档:

MongoDB Enterprise> db.tab01.find({name:/a/})

{ "_id" : ObjectId("5bfcc7b036850458dff055a5"), "name" : "a", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a6"), "name" : "ab", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a7"), "name" : "bac", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055aa"), "name" : "aaa", "age" : "14" }

{ "_id" : ObjectId("5bfcc7b036850458dff055ad"), "name" : "a", "age" : "17" }

{ "_id" : ObjectId("5bfcc7b136850458dff055ae"), "name" : "a", "age" : "18" }

{ "_id" : ObjectId("5bfccbc536850458dff055af"), "name" : "a", "age" : 19 }

{ "_id" : ObjectId("5bfccbc636850458dff055b0"), "name" : "a", "age" : 20 }

---查询 name 字段以"a"开头的文档:

MongoDB Enterprise> db.tab01.find({name:/^a/})

{ "_id" : ObjectId("5bfcc7b036850458dff055a5"), "name" : "a", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a6"), "name" : "ab", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055aa"), "name" : "aaa", "age" : "14" }

{ "_id" : ObjectId("5bfcc7b036850458dff055ad"), "name" : "a", "age" : "17" }

{ "_id" : ObjectId("5bfcc7b136850458dff055ae"), "name" : "a", "age" : "18" }

{ "_id" : ObjectId("5bfccbc536850458dff055af"), "name" : "a", "age" : 19 }

{ "_id" : ObjectId("5bfccbc636850458dff055b0"), "name" : "a", "age" : 20 }

---查询 name 字段以"a"结尾的文档:

---db.tab01.insert({name:'nba',age:21})

---db.tab01.insert({name:'cba',age:21})

MongoDB Enterprise> db.tab01.find({name:/a$/})

{ "_id" : ObjectId("5bfcc7b036850458dff055a5"), "name" : "a", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055aa"), "name" : "aaa", "age" : "14" }

{ "_id" : ObjectId("5bfcc7b036850458dff055ad"), "name" : "a", "age" : "17" }

{ "_id" : ObjectId("5bfcc7b136850458dff055ae"), "name" : "a", "age" : "18" }

{ "_id" : ObjectId("5bfccbc536850458dff055af"), "name" : "a", "age" : 19 }

{ "_id" : ObjectId("5bfccbc636850458dff055b0"), "name" : "a", "age" : 20 }

{ "_id" : ObjectId("5bfcf37936850458dff055b1"), "name" : "nba", "age" : 21 }

{ "_id" : ObjectId("5bfcf37936850458dff055b2"), "name" : "cba", "age" : 21 }

=======

9 AND 

=======

MongoDB 的 find() 方法可以传入多个键(key),每个键(key)以逗号隔开,即常规 sql 的 AND 条件。

语法格式如下:

MongoDB Enterprise> db.tab01.find({name:'a', age:20})

{ "_id" : ObjectId("5bfccbc636850458dff055b0"), "name" : "a", "age" : 20 }

MongoDB Enterprise> db.tab01.find({name:'a',age:{$gt:18}})

{ "_id" : ObjectId("5bfccbc536850458dff055af"), "name" : "a", "age" : 19 }

{ "_id" : ObjectId("5bfccbc636850458dff055b0"), "name" : "a", "age" : 20 }

=======

10 OR 

=======

MongoDB OR 条件语句使用了关键字 $or:

MongoDB Enterprise> db.tab01.find({$or:[{name:'nba'},{age:'12'}]})

{ "_id" : ObjectId("5bfcc7b036850458dff055a8"), "name" : "d", "age" : "12" }

{ "_id" : ObjectId("5bfcf37936850458dff055b1"), "name" : "nba", "age" : 21 }

---AND 和 OR 联合使用

MongoDB Enterprise> db.tab01.find({name:'a',$or:[{age:'18'},{age:20}]})

{ "_id" : ObjectId("5bfcc7b136850458dff055ae"), "name" : "a", "age" : "18" }

{ "_id" : ObjectId("5bfccbc636850458dff055b0"), "name" : "a", "age" : 20 }

==========

11 Limit

==========

MongoDB Limit() 方法

如果你需要在MongoDB中读取指定数量的数据记录,可以使用MongoDB的Limit方法,limit()方法接受一个数字参数,该参数指定从MongoDB中读取的记录条数。

limit()方法基本语法如下所示:

MongoDB Enterprise> db.tab01.find({age:'10'}).limit(1)

{ "_id" : ObjectId("5bfcc7b036850458dff055a5"), "name" : "a", "age" : "10" }

MongoDB Enterprise> db.tab01.find().limit(2)

{ "_id" : ObjectId("5bfcc7b036850458dff055a5"), "name" : "a", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a6"), "name" : "ab", "age" : "10" }

=========

12 Skip

=========

MongoDB Skip() 方法

我们除了可以使用limit()方法来读取指定数量的数据外,还可以使用skip()方法来跳过指定数量的数据,skip方法同样接受一个数字参数作为跳过的记录条数。

注:skip()方法默认参数为 0 。

skip() 方法脚本语法格式如下:

>db.COLLECTION_NAME.find().limit(NUMBER).skip(NUMBER)

实例

以下实例只会显示第二条文档数据

MongoDB Enterprise> db.tab01.find({age:'10'}).limit(1).skip(2)

{ "_id" : ObjectId("5bfcc7b036850458dff055a7"), "name" : "bac", "age" : "10" }

=======================

13 MongoDB 排序 Sort

=======================

skip(), limilt(), sort()三个放在一起执行的时候,执行的顺序是先 sort(), 然后是 skip(),最后是显示的 limit()。

MongoDB sort() 方法

在 MongoDB 中使用 sort() 方法对数据进行排序,sort() 方法可以通过参数指定排序的字段,并使用 1 和 -1 来指定排序的方式,其中 1 为升序排列,而 -1 是用于降序排列。

语法

sort()方法基本语法如下所示:

>db.COLLECTION_NAME.find().sort({KEY:1})

实例

---升序

MongoDB Enterprise> db.tab01.find().sort({age:1})

{ "_id" : ObjectId("5bfccbc536850458dff055af"), "name" : "a", "age" : 19 }

{ "_id" : ObjectId("5bfccbc636850458dff055b0"), "name" : "a", "age" : 20 }

{ "_id" : ObjectId("5bfcf37936850458dff055b1"), "name" : "nba", "age" : 21 }

{ "_id" : ObjectId("5bfcf37936850458dff055b2"), "name" : "cba", "age" : 21 }

{ "_id" : ObjectId("5bfcc7b036850458dff055a5"), "name" : "a", "age" : "10" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a8"), "name" : "d", "age" : "12" }

{ "_id" : ObjectId("5bfcc7b036850458dff055a9"), "name" : "e", "age" : "13" }

{ "_id" : ObjectId("5bfcc7b036850458dff055aa"), "name" : "aaa", "age" : "14" }

......

---降序

MongoDB Enterprise> db.tab01.find().sort({age:-1})

{ "_id" : ObjectId("5bfcc7b136850458dff055ae"), "name" : "a", "age" : "18" }

{ "_id" : ObjectId("5bfcc7b036850458dff055ad"), "name" : "a", "age" : "17" }

{ "_id" : ObjectId("5bfcc7b036850458dff055ac"), "name" : "g", "age" : "16" }

......

---取age最大值

MongoDB Enterprise> db.tab01.find().sort({age:-1}).limit(1)

{ "_id" : ObjectId("5bfcc7b136850458dff055ae"), "name" : "a", "age" : "18" }

---取age最二大值

MongoDB Enterprise> db.tab01.find().sort({age:-1}).limit(1).skip(1)

{ "_id" : ObjectId("5bfcc7b036850458dff055ad"), "name" : "a", "age" : "17" }

---取age最三大值

MongoDB Enterprise> db.tab01.find().sort({age:-1}).limit(1).skip(2)

{ "_id" : ObjectId("5bfcc7b036850458dff055ac"), "name" : "g", "age" : "16" }

======================

14 count查询记录条数

======================

使用count()方法查询表中的记录条数,例如,下面的命令查询表users的记录数量:

MongoDB Enterprise> db.tab01.find().count();

14

欢迎关注我的微信公众号"IT小Chen",共同学习,共同成长!!!

MongoDB日常运维-01常用命令汇总

MongoDB日常运维-01常用命令汇总


您可能感兴趣的文档:

--结束END--

本文标题: MongoDB日常运维-01常用命令汇总

本文链接: https://www.lsjlt.com/news/49556.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • MongoDB日常运维-01常用命令汇总
    MongoDB常用命令汇总(一) ---增,删,改,查 一:增(insert) 二:删(delete) 三:改(update) 四:查(select)  ---连接数...
    99+
    2024-04-02
  • MongoDB的常用命令汇总(Mongo4.2.8)
    目录一、数据库相关二、用户相关三、集合Collection相关一、数据库相关 1.切换/创建数据库 >use “dbname”; 2.查询所有数据库 > show dbs...
    99+
    2024-04-02
  • MongoDB日常运维中搭建错误汇总有哪些
    今天就跟大家聊聊有关MongoDB日常运维中搭建错误汇总有哪些,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。错误一:集群初始化时,报错:replSe...
    99+
    2024-04-02
  • Linux运维宝典:最常用的150个命令汇总
    阅读本文大概需要 2.8 分钟。...
    99+
    2023-06-05
  • mysqladmin常用命令汇总
    mysqladmin 工具的使用格式: mysqladmin [option] command [command option] command ...... 参数选项: -c number...
    99+
    2024-04-02
  • Git常用命令汇总
    1、配置自己的用户名和邮箱 git config --global user.name "用户名" //加引号 git config --global user.email "邮箱地...
    99+
    2024-04-02
  • RMAN常用命令汇总
    这篇文章主要讲解了“RMAN常用命令汇总”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“RMAN常用命令汇总”吧!1.    ...
    99+
    2024-04-02
  • Linux常用命令汇总
    1、tcpdump抓包 tcpdump这个命令是用来抓包的,默认情况下这个命令是没有的,需要安装一下: yum install -y tcpdump 使用这个命令的时候最好是加上你网卡的名称,不...
    99+
    2023-09-05
    linux 服务器 运维
  • Java常用命令汇总
    这篇文章就主要向大家展示了Java编程中常用的命令,下面看下具体内容。1、javac 将文件编译成.class文件用法: javac <options> <source files>其中, 可能的选项包括: -g ...
    99+
    2023-05-31
    java 常用命令 ava
  • mha日常维护命令总结
    这篇文章主要讲解了“mha日常维护命令总结”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“mha日常维护命令总结”吧! mha 日常维护命令1.查...
    99+
    2024-04-02
  • 常用的mysql命令汇总
    这篇文章主要讲解了“常用的mysql命令汇总”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“常用的mysql命令汇总”吧!一、连接MySQL &nb...
    99+
    2024-04-02
  • JVM的常用命令汇总
    目录简介jpsjinfojstatjstackjmap简介 监测java应用,最方便的就是直接使用jdk提供的现成工具,在jdk的安装的bin目录下,已经提供了多种命令行监测工具,以...
    99+
    2022-11-13
    JVM常用命令 JVM 命令
  • MySql 之 常用命令汇总
    MySql 常用命令汇总 用户管理:一、数据库操作:二、创建表:三、修改表:四、插入数据:五、更新数据:六、删除数据:七、条件控制:八、MySQL的正则表达式:九、MySQL的一些函数:十、分组查询:十一、UNION规则——...
    99+
    2023-08-18
    mysql
  • Linux日常维护常用命令
    本篇内容介绍了“Linux日常维护常用命令”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!网络命令: # ifconfig# 显示网络信息,包...
    99+
    2023-06-13
  • mysql常用命令汇总介绍
    设置更改mysqlroot密码 首次进入mysql数据库, ! 可以将mysql绝对路径加入到环境变量中, 还可以设置开机加载, 重新加载环境变量让mysql生效 重新登录 mysql...
    99+
    2024-04-02
  • CentOS常用基础命令汇总
    CentOS常用基础命令汇总 1.关机 (系统的关机、重启以及登出 ) 的命令 shutdown -h now 关闭系统(1) init 0 关闭系统(2) telinit 0 关闭系统(3) shu...
    99+
    2023-09-08
    centos linux 服务器
  • linux日常命令总结
    这篇文章主要介绍“linux日常命令总结”,在日常操作中,相信很多人在linux日常命令总结问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”linux日常命令总结”的疑惑有所帮助!接下来,请跟着小编一起来学习吧...
    99+
    2023-06-05
  • Linux系统运维常用命令及常识
    本篇内容介绍了“Linux系统运维常用命令及常识”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!1 文件管理2 软件管理3 系统管理4 服务管...
    99+
    2023-06-09
  • Linux运维常用命令有哪些
    这篇文章主要介绍Linux运维常用命令有哪些,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!查看有多少个IP访问: awk '{print $1}' log_file|sort|uniq|wc...
    99+
    2023-06-09
  • ADB安装方法及常用命令汇总
    目录 ADB简介ADB安装ADB常用命令后记 ADB简介 ADB即Android Debug Bridge,起到调试桥的作用,使用ADB可以用电脑快速对手机进行调试,如安装APK、push文件等。 ADB安装 电脑中必须安装有J...
    99+
    2023-08-22
    adb android 移动开发 android studio
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作