2.将csv格式的数据导入到mysql中:
>mysql -u root -p
Enter password:
>use 数据库名称;
>load data infile 'mongodb导出文件的路径' into table 表名 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '/n';
注:如果出现Can't get stat of 的错误,用下面的方法实现:
>mysql --local-infile -u root -p
Enter password:
>load data local infile 'mongodb导出文件的路径' into table 表名 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '/n';