启动MongoDB提示报警信息:“WARNING: Access control is not enabled for the database.”
2017-08-30 21:57
1741 查看
问题描述:启动MongoDB提示报警信息:“WARNING: Access control is not enabled for the database.”
原因分析:新版本的MongDB增加了安全性设计,推荐用户创建使用数据库时进行验证。如果用户想建立简单连接,则会提示警示信息。
解决方案:
创建管理员并设置密码
重启数据库服务器
“–auth”命令即表示访问数据库需要认证。此处可不指定端口,则默认为27017。
启动后即可看到不再提示报警信息。
原因分析:新版本的MongDB增加了安全性设计,推荐用户创建使用数据库时进行验证。如果用户想建立简单连接,则会提示警示信息。
解决方案:
创建管理员并设置密码
>use admin >db.createUser( { user: "admin", //用户名 pwd: "passwd", //密码 roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] //设置权限 } )
重启数据库服务器
mongod --auth --port 27017 --dbpath D:\MongoDB\Data\db
“–auth”命令即表示访问数据库需要认证。此处可不指定端口,则默认为27017。
启动后即可看到不再提示报警信息。
相关文章推荐
- mongodb access control is not enabled for the database
- Node.js使用MongoDB3.4+Access control is not enabled for the database解决方案
- mongo11---Access control is not enabled for the database
- mogodb创建用户:access control is not enabled for the database
- The SQL Server Service Broker for the current database is not enabled
- 安装Visual Studio 2010时提示"The location specified for the help content store is invalid or you do not have access to it".
- 删除sybase一列报错:The 'select into' database option is not enabled for database.....
- The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported.
- [Solved]: System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use.
- ArcSDE for SQL Server建库提示:Case sensitive database is not supported
- ABP PUT、DELETE请求错误405.0 - Method Not Allowed 因为使用了无效方法(HTTP 谓词) 引发客户端错误 No 'Access-Control-Allow-Origin' header is present on the requested resource
- xsql启动时提示Warning : Readline library was not found. Line editor is disabled.
- Rails 4 - Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded
- 启动unity3d 提示“unity3d EditorWindow could not be loaded because the script is not found in the projec”
- Error: 9001, Severity: 21, State: 5 The log for database 'xxxx' is not available
- Issue: Server principal is not able to access the database under the current security context
- mac 下从设置启动mysql 失败,“Warning:The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mys
- The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the ser
- 求助:TFS 使用 database project时提示“The server returned content type text/html, which is not supported.”
- mac 下从设置启动mysql 失败,“Warning:The /usr/local/mysql/data directory is not owned by