mysql> show variables like '%local%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | local_infile | OFF | +---------------+-------+ 1 row in set, 1 warning (0.00 sec)
mysql>
mysql> set global local_infile = 'on'; Query OK, 0 rows affected (0.00 sec)
mysql> show variables like '%local%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | local_infile | ON | +---------------+-------+ 1 row in set, 1 warning (0.00 sec)
mysql>
C:\Users\13405>mysql --local_infile=1 -u root -p Enter password: ****
mysql> load data local infile 'f:\pet.txt' into table pet; Query OK, 0 rows affected (0.00 sec) Records: 0 Deleted: 0 Skipped: 0 Warnings: 0
mysql> exit