首页 > 数据库 >mysql ERROR 3948 (42000): Loading local data is disabled; this must be enabled on both the client an

mysql ERROR 3948 (42000): Loading local data is disabled; this must be enabled on both the client an

时间:2023-03-14 15:46:39浏览次数:49  
标签:3948 both Loading data server sec mysql local row

mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.20    |
+-----------+
1 row in set (0.00 sec)

  使用 load data 导入数据时候报错

解决办法

1.server端

mysql> show variables like '%local_infile%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile  | ON    |
+---------------+-------+
1 row in set (0.01 sec)

2.client端

mysql --local-infile 登录服务端

mysql> load data local infile '/tmp/pet.text' into table pet;
Query OK, 1 row affected (0.01 sec)
Records: 1  Deleted: 0  Skipped: 0  Warnings: 0

  

标签:3948,both,Loading,data,server,sec,mysql,local,row
From: https://www.cnblogs.com/dbahrz/p/17215146.html

相关文章