Load data infile MySQL with absolute URL

前端 未结 2 777
隐瞒了意图╮
隐瞒了意图╮ 2021-01-25 22:32

i trying load a CSV in a table. I have my CSV in a folder of my server. (wwww.myweb.com/temp/file.csv)

I use this sentence:

LOAD DATA INFILE \'http://www         


        
2条回答
  •  情话喂你
    2021-01-25 23:07

    1. Save CSV file on your LOCAL computer.
    2. Connect to the DB from your LOCAL computer
    3. Issue the following command: load data LOCAL infile '/tmp/file.csv' INTO TABLE table_name;

    You can also load data files by using the mysqlimport utility; it operates by sending a LOAD DATA INFILE statement to the server. The --local option causes mysqlimport to read data files from the client host.

提交回复
热议问题