解决——》ERROR 2068 (HY000) LOAD DATA LOCAL INFILE file request rejected due to restrictions on access.

推荐链接:
    总结——》【Java】
    总结——》【Mysql】
    总结——》【Redis】
    总结——》【Kafka】
    总结——》【Spring】
    总结——》【SpringBoot】
    总结——》【MyBatis、MyBatis-Plus】

@[TOC](解决——》ERROR 2068 (HY000) LOAD DATA LOCAL INFILE file request rejected due to restrictions on access.)

1、操作

load data local infile "c:/Users/xiaox/Desktop/test.txt" into table test (id,area);

2、现象

ERROR 2068 (HY000): LOAD DATA LOCAL INFILE file request rejected due to restrictions on access.

3、原因

未启用local_infile

4、解决

启动local_infile

mysql> show global variables like 'local_infile';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile  | OFF   |
+---------------+-------+
1 row in set, 1 warning (0.02 sec)

mysql> set global local_infile=1;
Query OK, 0 rows affected (0.00 sec)

你可能感兴趣的:(Mysql,local,data,load)