查看数据库信息
show dbs
查看用户
show users
修改用户密码
db.updateUser( "admin",{pwd:"password"})
密码认证
db.auth("admin","password")
在nodejs中连接mongo
const url = 'mongodb://admin:123456@localhost:27017/';
上一篇:mongodb数据库角色集合
查看数据库信息
show dbs
查看用户
show users
修改用户密码
db.updateUser( "admin",{pwd:"password"})
密码认证
db.auth("admin","password")
在nodejs中连接mongo
const url = 'mongodb://admin:123456@localhost:27017/';
让时间为你证明