You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
415 B
22 lines
415 B
use dbmgame_test
|
|
|
|
db.auth({user:"mmog",pwd:"mmog"})
|
|
|
|
// dropDatabase需要dbAdmin权限, tbuser.drop只用readWrite权限即可, 尽可能少给权限
|
|
//db.dropDatabase()
|
|
|
|
db.tbuser.drop()
|
|
|
|
// 角色数据
|
|
db.tbuser.createIndex(
|
|
{ uid : 1 },
|
|
{ unique : true, background : true }
|
|
)
|
|
|
|
db.tbuser.createIndexes(
|
|
[
|
|
{ realm : 1, level : 1 },
|
|
{ nick : 1 }
|
|
],
|
|
{ background : true }
|
|
)
|
|
|