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 '\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 db imported into mongodb)