欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

ERROR 3948 (42000): Loading local data is disabled问题解决

发布时间:2023/12/31 编程问答 34 豆豆
生活随笔 收集整理的这篇文章主要介绍了 ERROR 3948 (42000): Loading local data is disabled问题解决 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

服务器版本:

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问题解决的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。