gpt4 book ai didi

MySQL 错误代码 : 3948 Loading local data is disabled; this must be enabled on both the client and server sides

转载 作者:行者123 更新时间:2023-12-05 01:30:43 24 4
gpt4 key购买 nike

我有这段代码可以将 CSV 文件上传到 MySQL,我尝试上传我创建的 CSV 文件,但是当我运行代码时我一直收到这个错误。

我要运行的代码在这里:

Load Data Local Infile

'/Users/dylanpowell/Dropbox/Dylan Powell/Berkeley Investment Advisors/Dylans Stock Evaluations/Bottom Scores at 9-7-19.csv'

Into Table Stock_Evaluator_Raw_Scores
Fields Terminated by ','

Enclosed by '"'

Escaped by '\\'

Lines terminated by '\n'
Ignore 1 Lines;

错误如下:

Error Code: 3948. Loading local data is disabled; this must be enabled on both the client and server side. Load Data Local Infile '/Users/dylanpowell/Dropbox/Dylan Powell/Berkeley Investment Advisors/Dylans Stock Evaluations/Bottom Scores at 9-7-19.csv'Into Table Stock_Evaluator_Raw_Scores Fields Terminated by ','Enclosed by '"' Escaped by '\\'Lines terminated by '\n' Ignore 1 Lines; 

我注意到这个问题还有另一个堆栈溢出,但我不确定如何实现这些方法来让我的代码运行。

最佳答案

  1. 打开MYSQL命令行

  2. 输入密码

  3. 输入以下内容:

    显示像'local_infile'这样的全局变量;

  4. 如果 local_infile 值等于 false,通过以下方式将其设置为 true:

    设置全局 local_infile = true;

更多信息在这里:https://www.digitalocean.com/community/questions/how-to-enable-local-capability-in-mysql-workbench

关于MySQL 错误代码 : 3948 Loading local data is disabled; this must be enabled on both the client and server sides,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66848547/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com