how to 'load data infile' on amazon RDS?

后端 未结 6 1116
刺人心
刺人心 2020-12-23 17:09

not sure if this is a question better suited for serverfault but I\'ve been messing with amazon RDS lately and was having trouble getting \'file\' privileges to my web host

6条回答
  •  既然无缘
    2020-12-23 17:31

    Importing bulk data into Amazon MySQL RDS is possible two ways. You could choose anyone of below as per your convenience.

    1. Using Import utility.

      mysqlimport --local --compress  -u  -p -h   --fields-terminated-by=',' TEST_TABLE.csv
      --Make sure, here the utility will be inserting the data into TEST_TABLE only.
      
    2. Sending a bulk insert SQL by piping into into mysql command.

      mysql -u  -p -h   < TEST_TABLE_INSERT.SQL
      --Here file TEST_TABLE_INSERT.SQL will have bulk import sql statement like below
      --insert into TEST_TABLE values('1','test1','2017-09-08'),('2','test2','2017-09-08'),('3','test3','2017-09-08'),('3','test3','2017-09-08');
      

提交回复
热议问题