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

CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20),species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
LOAD DATA LOCAL INFILE 'C:\\Users\\Administrator\\Desktop\\pet.txt' INTO TABLE pet LINES TERMINATED BY '\r\n';

提示是限制了本地文件加载:
根据文档LOAD DATA LOCAL提示:https://dev.mysql.com/doc/refman/8.0/en/load-data-local-security.html#load-data-local-permitted-files
修改本地加载功能: set global local_infile = 1;
参考:
https://www.cnblogs.com/Thancoo/p/mysql8loaddatadisable.html

ERROR 3948 (42000): Loading local data is disabled; this must be enabled on both the client and serv_第1张图片

你可能感兴趣的:(mysq配置l报错)