首页 > 数据库技术 > 详细

阿里云Mysql导入大数据文件

时间:2019-05-22 21:55:25      阅读:133      评论:0      收藏:0      [点我收藏+]

 

 

1、查询数据到CSV文件

select * from account into outfile ‘/root/account.csv‘ fields terminated by ‘,‘ enclosed by ‘"‘ lines terminated by ‘\r\n‘

 注意:可通过终端方式查询或者服务器上连接数据查询所得。

 

2、将大文件数据(SQL)导入到服务器

scp -P 端口号 -i 私钥绝对路径地址 数据存放的绝对路径 root@IP:/tmp/

 

3、导入数据

load data local infile ‘/tmp/account.csv‘ into table account fields terminated by ‘,‘ enclosed by ‘"‘ lines terminated by ‘\r\n‘;

注意:/tmp/account.csv 为将要导入的数据文件;account为已经存在的表

阿里云Mysql导入大数据文件

原文:https://www.cnblogs.com/dadonggg/p/10908380.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!