数据库管理工具

予早 2026-04-30 23:53:28
Categories: Tags:

mongo

mongo --host=? --port=?
mongo 192.168.214.215:27002

使用该工具可以远程直连

默认数据库

admin

config

关闭mongodb

./mongod --shutdown --dbpath=../single/data/db
use admin
db.runCommand("shutdown")
db.rushutdownServer()

修改用户密码

  1. 直接对表更新,db.admin.users.update
  2. db.addUser()
  3. db.changeUserPassword()