服务器版本:

Server version: 8.0.20-0ubuntu0.19.10.1 (Ubuntu)

完整报错如下:

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

解决方案如下:

①客户端设置

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile  | OFF   |
+---------------+-------+
1 row in set (0.04 sec)

mysql> SET GLOBAL local_infile = true;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile  | ON    |
+---------------+-------+
1 row in set (0.00 sec)

②服务端设置

mysql.conf.d/mysqld.cnf的[mysqld]下面添加local-infile

conf.d/mysql.cnf的[mysql]下面添加local-infile
mysql.conf.d/mysql.cnf的[mysql]下面添加local-infile

重启mysql服务端

-------------

上述①②需要全部配置才能起到作用。

ERROR 3948 (42000): Loading local data is disabled问题解决相关推荐

  1. 【操作经验】Mysql如何加载导入大批量数据,解决报错ERROR 3948 (42000)

    前言:新装mysql,遇到ERROR 3948 (42000):Loading local data is disabled; this must be enabled on both the cli ...

  2. mysql的indata文件_【数据分析】MySQL之不能导入本地文件“Loading local data is disable;”...

    今天在使用"利用MySQL的命令行进行CSV文件的导入"时,遇到了这样一个问题: 提示本地文件无法导入,必须要"同时获得客户端和服务器端的许可". 很难受,于是 ...

  3. 【已解决】Error occurred during loading data. Trying to use cache server_Python系列学习笔记

    报错: Error occurred during loading data. Trying to use cache server Error occurred during loading dat ...

  4. [zabbix]cat ‘/home/cjw/create (1).sql/data‘ | mysql -uzabbix -p123456 -Dzabbix ERROR 1049 (42000):

    ERROR 1049 (42000): Unknown database 'zabbix' cat '/home/xx/create (1).sql/data' | mysql -uzabbix -p ...

  5. mysql error 1148_MYSQL入坑第一弹--------ERROR 1148 (42000)ERROR 1290 (HY000)

    这是因为: 服务器端,local_infile默认开启:客户端,local_infile默认关闭,因此用的时候需要打开. On the server side: The local_infile sy ...

  6. 【报错记录】MySQL向数据库中导入txt文件报错ERROR 1148 (42000): The used command is not allowed with this MySQL version

    背景 想将txt文件导入到数据库中,输入LOAD DATA LOCAL INFILE "D:\dbms_lab\department.txt" INTO TABLE DEPARTM ...

  7. 最近项目开发再一次遇到了启动idea报错:Plugin Error Problems found loading plugins: Plugin “GlassFish Integration“ was

    最近项目开发再一次遇到了启动idea报错:Plugin Error Problems found loading plugins: Plugin "GlassFish Integration ...

  8. ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your

    在MySQL中导入.sql文件时 通过 use data source C:/info.sql use data(数据库名称为data) source C:/info.sql(提前把.sql文件放入一 ...

  9. Error in terms.formula(formula, data = data) : invalid model formula in ExtractVars

    Error in terms.formula(formula, data = data) :invalid model formula in ExtractVars 目录 Error in terms ...

最新文章

  1. 第三节:Web爬虫之BeautifulSoup解析库
  2. 使下拉框某项不可选的方法
  3. C++源码的调用图生成
  4. typora图床教程-阿里云版
  5. 结果集 tostring_关于避免对toString()结果进行解析或基于逻辑的美德
  6. html中%3c%3e括号,打开关闭大括号检查
  7. 史上最全的人工智能知识图谱
  8. 管理九段,你的管理入围“几段”了?
  9. 斐讯k2华硕虚拟服务器,斐讯K2路由器三步刷入华硕固件
  10. Git版本控制(完美整理版)
  11. 如何对文件进行压缩和解压缩
  12. Unity 实现2D地面挖洞!涂抹地形
  13. python实现签名ElGamal算法
  14. 在网页中显示PPT、Word、Excel
  15. 主流的大数据BI软件有哪些?
  16. 西方经济学微观部分中的英文字母缩写
  17. [蓝桥杯][2018年第九届真题]日志统计(尺取法)
  18. 安装程序无法创建新的系统分区或者无法识别
  19. Dual attention network for scene segmentation
  20. 【HCIA安全】用户认证

热门文章

  1. 输出某个目录下的所有文件和文件夹,包括子文件夹中的内容
  2. eclipse新建maven项目(2)
  3. Activity与Intent
  4. 简明Vim练级攻略(转)
  5. IE6 下图片少一块
  6. node和npm版本更新
  7. linux smb 所有者,python-3.x - 在Linux上使用python从smb共享中获取文件的所有者。 - SO中文参考 - www.soinside.com...
  8. 禅道开源版用户手册_自动化建模 | H2O开源工具介绍
  9. linux git中央仓库地址,如何在Linux上搭建一个Git中央仓库
  10. python中digits什么意思_在Caffe中使用 DIGITS自定义Python层