当前位置:Gxlcms > 数据库问题 > 将MySQL数据导入MongoDB

将MySQL数据导入MongoDB

时间:2021-07-01 10:21:17 帮助过:1人阅读

1、进入Mysql,将数据导成CVS

select * from test_info into outfile ‘/tmp/test.csv‘ fields terminated by ‘,‘ optionally enclosed by ‘"‘ escaped by ‘"‘ lines terminated by ‘\r\n‘;    2、将CVS导入到Mongodb中 E:\mydrive\Project\HouseDataManageSystem\DB\mongoDB\bin\mongoexport -h "127.0.0.1:16688" -u"username" -p "password" -d "hdms" -c "MS_Updatelog" -f "Up_id,Up_content,Up_Updatetime" -type=csv -file=d:\MS_UpdateLog.csv

将MySQL数据导入MongoDB

标签:

人气教程排行