【解决】MySQL导入数据出现的问题:Error Code: 1290. The MySQL server is running with the --secure-file-priv option

问题描述:导入数据时,出现这个错误:

Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

解决办法:

在MySQL安装路径找到my.ini文件,

(一般是C盘或D盘吧,看你们自己的安装情况,我的如下:)

D:\ProgramData\MySQL\MySQL Server 5.7\my.ini

找到这串字“secure_file_priv”,设它没有值:

secure_file_priv=

解释一下,

secure_file_priv 为 null 时,表示限制mysqld不允许导入或导出。
secure_file_priv 为 C:\temp 时,表示限制mysqld只能在C:\temp目录中执行导入导出,其他目录不能执行。
secure_file_priv 没有值时,表示可在任意目录导入导出。

 

然后重启MySQL服务,如下操作:

在任务栏搜索框输入“services.msc”,找到MySQL,然后重启一下,OK。

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值