mysql db imported into mongodb

desc cwd_user
show columns from cwd_user
  select COLUMN_NAME from information_schema.columns where table_name='cwd_user' and table_schema='jiradb'


1、进入Mysql,将数据导成CVS
select * from test_info into outfile '/tmp/test.csv' fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by ' ';

2、将CVS导入到Mongodb中
E:mydriveProjectHouseDataManageSystemDBmongoDBinmongoexport -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

原文地址:https://www.cnblogs.com/SZLLQ2000/p/5160605.html