MySQL 8.0.29
Source Code Documentation
LOCAL INFILE Request

If the client wants to LOAD DATA from a LOCAL file into the server it sends:

LOAD DATA LOCAL INFILE '<filename>' INTO TABLE <table>;
@ LOCAL
the view WHERE clause is checked, but no underlying views are checked
Definition: mysqlx_crud.proto:364
#define LOAD
Definition: sql_yacc.h:1125
@ INFILE
Definition: sql_yacc.h:281
@ INTO
Definition: sql_yacc.h:291
Definition: table.h:1394

The LOCAL keyword triggers the server to set a LOCAL INFILE request packet which asks the client to send the file via a LOCAL INFILE Data response

The client has to send the CLIENT_LOCAL_FILES capability flag.

Returns
LOCAL INFILE Data
Payload
TypeNameDescription
int<1> packet type 0xFB: LOCAL INFILE
string<EOF> filename the path to the file the client shall send
Example
0c 00 00 01 fb 2f 65 74 63 2f 70 61 73 73 77 64 ...../etc/passwd
See also
handle_local_infile, mysql_set_local_infile_handler, net_request_file, Sql_cmd_load_table::execute_inner