发布于 2015-09-14 14:56:52 | 175 次阅读 | 评论: 0 | 来源: 网络整理

db.addUser("username", "password"[, readOnly])
参数:
  • username (string) – Specifies a new username.
  • password (string) – Specifies the corresponding password.
  • readOnly (boolean) – Optional. Restrict a user to read-privileges only. Defaults to false.

Use this function to create new database users, by specifying a username and password as arguments to the command. If you want to restrict the user to have only read-only privileges, supply a true third argument; however, this defaults to false.

For example:

db.addUser("user1" , "pass" , { readOnly : true } )
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务