当前位置:网站首页>MongoDB数据库shell命令执行
MongoDB数据库shell命令执行
2022-07-28 17:04:00 【水月清辉】
方法一:
echo "db.testdb.find({'status':'running'}).count()"|/opt/mongodb/bin/mongod 1.0.0.9:8635/test -u 'test' -p "xxxx"
方法二:
/opt/mongodb/bin/mongod 1.0.0.9:8635/test -u 'test' -p "xxxx" -eval "db.testdb.find({}).count()"
方法三:
echo "use test" > test.js
echo "db.testdb.find({}).count()" >> test.js
/opt/mongodb/bin/mongod 1.0.0.9:8635/test -u 'test' -p "xxxx" < test.js
边栏推荐
猜你喜欢

网络RJ45接口详解

Advanced Design System(ADS)2009 射频仿真入门

频谱仪原理简介一

Composition and principle of vector network analyzer (vector network)

Application of Internet of things in smart city

After CentOS uses docker to run mysql, the remote connection needs to open the port

Five key considerations for network security budget planning in 2023

天线的主要参数介绍

The growth path of hardware engineers (0) -- Understanding components

直播|StarRocks 技术内幕 :低基数全局字典优化
随机推荐
7-day sales of video number exceed one million
Iptables configuration
VSC上写Go出现expected ‘package‘, found ‘EOF‘
Busybox latest version (busybox APK)
Brief introduction to the principle of spectrometer I
深圳线下报名|StarRocks on AWS:如何对实时数仓进行极速统一分析
There is a special cryptology language called asn.1
Go的walk库报错
Cout.write learning
vmware虚拟机联网设置(win10自带虚拟机安装win7)
Examples of AC simulation and S-parameter simulation of ADS simulation
1.08 billion dollars! TCL technology acquires Samsung Suzhou 8.5 generation line: the production capacity will increase by 60% in the next year!
#夏日挑战赛#【FFH】JS自定义组件:DIY一个随点随用的键盘!(一)
USB type-C details
Some methods of realizing video account
MQTT over QUIC:下一代物联网标准协议为消息传输场景注入新动力
Tcp/ip detailed diagram
Composition and principle of vector network analyzer (vector network)
Power adapter global definition
solidity转账函数的实现(基于transfer)