zoukankan      html  css  js  c++  java
  • 阿里云Mysql导入大数据文件

    1、查询数据保存为CSV文件

    select * from account into outfile '/root/account.csv' fields terminated by ',' enclosed by '"' lines terminated by ' '

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

     

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

    A:将终端上查询的文件传到服务器

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

     

    B:导入数据

    load data local infile '/tmp/account.csv' into table account fields terminated by ',' enclosed by '"' lines terminated by ' ';

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

  • 相关阅读:
    模板
    2019牛客暑期多校训练营(第五场)
    Codeforces
    Codeforces
    SCUT
    模板
    Codeforces
    2019 Multi-University Training Contest 4
    Codeforces
    Codeforces
  • 原文地址:https://www.cnblogs.com/dadonggg/p/10908380.html
Copyright © 2011-2022 走看看