python链接mongodb需要指定数据库
import pymongo
monclient = pymongo.MongoClient("mongodb://用户名:密码@192.168.10.200:27017/数据库名")
mondb = monclient["数据库名"]
moncol = mondb["表名"]
网上很多资料都没有指定数据库名,导致后续操作提示没有权限
python链接mongodb需要指定数据库
import pymongo
monclient = pymongo.MongoClient("mongodb://用户名:密码@192.168.10.200:27017/数据库名")
mondb = monclient["数据库名"]
moncol = mondb["表名"]
网上很多资料都没有指定数据库名,导致后续操作提示没有权限