当前位置:Gxlcms > 数据库问题 > 阿里云Mysql导入大数据文件

阿里云Mysql导入大数据文件

时间:2021-07-01 10:21:17 帮助过:13人阅读

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导入大数据文件

标签:closed   mys   rmi   field   存在   scp   mysq   class   sed   

人气教程排行