第一步:将user表从MySQL中导出,右键,点击导出向导,选择格式为csv。(使用Navicat)
MySQL数据导入MongoDB
第二步:编辑上一步导出的cvs文件,为其添加头部,然后上传文件到Linux
MySQL数据导入MongoDB
第三步:导入数据到MongoDB
如果MongoDB没有创建用户,使用命令:

mongoimport --db 数据库名 --collection 集合名 --type csv --headerline --ignoreBlanks --file CSV文件存放路径
MySQL数据导入MongoDB
第四步:查看结果:
MySQL数据导入MongoDB

相关文章:

  • 2021-12-25
  • 2021-06-10
  • 2022-12-23
  • 2021-04-27
  • 2022-12-23
  • 2021-10-24
  • 2021-12-26
  • 2022-12-23
猜你喜欢
  • 2021-06-23
  • 2021-05-24
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
相关资源
相似解决方案