国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項超值服

開通VIP
MongoDB學(xué)習(xí)——數(shù)據(jù)庫管理命令
MongoDB學(xué)習(xí)——數(shù)據(jù)庫管理命令
2011年05月27日 星期五 15:38

1.進(jìn)入mongodb命令行管理
C:\Documents and Settings\Administrator>mongo
MongoDB shell version: 1.8.1
connecting to: test

 

2.顯示數(shù)據(jù)庫
> show dbs
admin   (empty)
local   (empty)
test_db 0.03125GB

 

3.使用數(shù)據(jù)庫
> use test_db
switched to db test_db

 

4.添加數(shù)據(jù)庫用戶
> db.users.save({username:"gerald"})

 

5.查找數(shù)據(jù)庫用戶
> db.users.find()
{ "_id" : ObjectId("4ddf396e641b4986d346fe89"), "username" : "gerald" }

 

6.添加隸屬于某個數(shù)據(jù)庫的用戶
> use test_db
switched to db test_db
> db.addUser("gerald","123456")
{
        "user" : "gerald",
        "readOnly" : false,
        "pwd" : "f528f606b8635241c7f060408973b5b9"
}

 

7.以用戶驗證的身份登錄數(shù)據(jù)庫
> use test_db
switched to db test_db
> db.auth("gerald","123456")
1

PS: 1代表驗證成功, 0代表驗證失敗

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
MongoDB 備份(mongodump)與恢復(fù)(mongorerstore) | 菜鳥教程
MongoDB(三):數(shù)據(jù)庫操作、集合操作
生日快樂:DB-Engines五周年及數(shù)據(jù)庫排行榜中的中國勢力
MongoDB新增用戶管理基本操作
SQLite新建數(shù)據(jù)庫及txt文件(CSV文件)導(dǎo)入
Docker基礎(chǔ):docker 安裝mongodb
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服