学习 MySQL中导入 导出CSV   

http://blog.csdn.net/sara_yhl/article/details/6850107    速度是很快的

 

  1. 导出
select * from test_info   
into outfile '/tmp/test.csv'   
fields terminated by ',' optionally enclosed by '"' escaped by '"'   
lines terminated by '\r\n';  
  1. 导入
load data infile '/tmp/test.csv'   
into table test_info    
fields terminated by ','  optionally enclosed by '"' escaped by '"'   
lines terminated by '\r\n';  

如果是远程连接mysql,可能会报错,可以试试 load data local infile …..

如果使用工具的话,一般更简单,比如使用navicat , workbench等

workbench可参考官方文档: 
https://dev.mysql.com/doc/workbench/en/wb-admin-export-import-table.html

http://www.jianshu.com/p/d330edb61fe2 
http://blog.csdn.net/sara_yhl/article/details/6850107

相关文章:

  • 2021-09-01
  • 2021-06-03
  • 2021-12-07
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-10-03
  • 2021-07-08
猜你喜欢
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-01-16
相关资源
相似解决方案