91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

mongoBD學習(二)客戶端的連接

發布時間:2020-07-13 00:28:05 來源:網絡 閱讀:6122 作者:adelazhu 欄目:MongoDB數據庫

mongo客戶端由bin/mongo啟動

0、幫助

root@adela-vm:/opt/mongodb_simple# ./bin/mongo --help
MongoDB shell version: 2.6.9
usage: ./bin/mongo [options] [db address] [file names (ending in .js)]

1、啟動mongoDB 客戶端進程

root@adela-vm:/opt/mongodb_simple# ./bin/mongo 127.0.0.1:12345/test
MongoDB shell version: 2.6.9
connecting to: 127.0.0.1:12345/test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
        http://docs.mongodb.org/
Questions? Try the support group
        http://groups.google.com/group/mongodb-user
>

2、關閉mongoDB 客戶端進程
方法1:
>db.shutdownServer()
> db.shutdownServer()
shutdown command only works with the admin database; try 'use admin'
必須要admin才能使用shutdown命令

> use admin
switched to db admin
> db.shutdownServer()
2015-03-27T11:33:49.502+0800 DBClientCursor::init call() failed
server should be down...
2015-03-27T11:33:49.506+0800 trying reconnect to 127.0.0.1:12345 (127.0.0.1) failed
2015-03-27T11:33:49.506+0800 warning: Failed to connect to 127.0.0.1:12345, reason: errno:111 Connection refused
2015-03-27T11:33:49.506+0800 reconnect 127.0.0.1:12345 (127.0.0.1) failed failed couldn't connect to server 127.0.0.1:12345 (127.0.0.1), connection attempt failed
>
方法2:kill -15 進程號或者kill (不加參數)進程號
除非在特殊情況下,避免使用kill -9 進程號

3、重新啟動mongo
numactl --interleave=all bin/mongod -f conf/mongod.conf
The program 'numactl' is currently not installed. You can install it by typing:
apt-get install numactl

安裝numactl
apt-get install numactl
root@adela-vm:/opt/mongodb_simple/log# apt-get install numactl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  numactl
0 upgraded, 1 newly installed, 0 to remove and 348 not upgraded.
Need to get 30.1 kB of archives.
After this operation, 135 kB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/universe numactl amd64 2.0.9~rc5-1ubuntu3 [30.1 kB]
Fetched 30.1 kB in 0s (62.3 kB/s)
Selecting previously unselected package numactl.
(Reading database ... 170689 files and directories currently installed.)
Preparing to unpack .../numactl_2.0.9~rc5-1ubuntu3_amd64.deb ...
Unpacking numactl (2.0.9~rc5-1ubuntu3) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up numactl (2.0.9~rc5-1ubuntu3) ...

重啟服務端
root@adela-vm:/opt/mongodb_simple# numactl --interleave=all bin/mongod -f conf/mongod.conf
about to fork child process, waiting until server is ready for connections.
forked process: 4223
child process started successfully, parent exiting

4、查看日志
tail mongod.log
2015-03-27T11:42:38.343+0800 [initandlisten] waiting for connections on port 12345


5、啟動客戶端

root@adela-vm:/opt/mongodb_simple# ./bin/mongo 127.0.0.1:12345/test
MongoDB shell version: 2.6.9
connecting to: 127.0.0.1:12345/test
>

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

洛阳市| 松阳县| 揭东县| 呼伦贝尔市| 阳朔县| 中方县| 吴川市| 资溪县| 平顺县| 巴南区| 高青县| 西贡区| 罗田县| 青冈县| 礼泉县| 吉安县| 黔西| 南汇区| 广元市| 青海省| 仙桃市| 百色市| 罗平县| 汽车| 中超| 金昌市| 卢龙县| 阳春市| 巫溪县| 平乐县| 闽侯县| 高安市| 井陉县| 碌曲县| 鹤山市| 泰顺县| 右玉县| 陆河县| 大安市| 鹿泉市| 芦溪县|