How should I tackle --secure-file-priv in MySQL?

前端 未结 21 1538
攒了一身酷
攒了一身酷 2020-11-22 06:04

I am learning MySQL and tried using a LOAD DATA clause. When I used it as below:

LOAD DATA INFILE \"text.txt\" INTO table mytable;
21条回答
  •  执念已碎
    2020-11-22 06:14

    I solved it using the LOCAL option in the command:

    LOAD DATA LOCAL INFILE "text.txt" INTO TABLE mytable;
    

    You can find more info here.

    If LOCAL is specified, the file is read by the client program on the client host and sent to the server. The file can be given as a full path name to specify its exact location. If given as a relative path name, the name is interpreted relative to the directory in which the client program was started.

提交回复
热议问题