MongoDB
1 安装:https://blog.csdn.net/CC_leather/article/details/105051719#_6
2 使用:
show dbs # 显示所有数据的列表
db # 显示当前数据库对象或集合
use admin # 连接到一个指定admin的数据库。3 数据库名字
不能是空字符串("")。 不得含有‘ ‘(空格)、.、$、/、\和\0 (空字符)。 应全部小写。 最多64字节。
有一些数据库名是保留的,可以直接访问这些有特殊作用的数据库,admin/ local /config
4 MongoDB shell 来连接 Mongodb 服务
标准 URI 连接语法: mongodb://[username:]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
创建数据库
use test
如果test 不存在则创建test,如果存在则切换到runoob
show dbs
没有test,要显示它,我们需要向 test 数据库插入一些数据。
插入数据
db.test.instert({name: ‘xm‘})
删除数据库
db.dropDatabase()