拒绝访问MySQL中的加载数据infile [英] access denied for load data infile in MySQL

查看:79
本文介绍了拒绝访问MySQL中的加载数据infile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在PHP中使用MySQL查询,但是当我尝试

I use MySQL queries all the time in PHP, but when I try

LOAD DATA INFILE

我收到以下错误

#1045-用户'user'@'localhost'的访问被拒绝(使用密码:是)

#1045 - Access denied for user 'user'@'localhost' (using password: YES)

有人知道这意味着什么吗?

Does anyone know what this means?

推荐答案

我也遇到了这个问题.我必须在我的SQL语句中添加 LOCAL .

I just ran into this issue as well. I had to add LOCAL to my SQL statement.

例如,这出现了权限问题:

For example, this gives the permission problem:

LOAD DATA INFILE '{$file}' INTO TABLE {$table}

在您的陈述中添加 LOCAL ,权限问题应该消失了.像这样:

Add LOCAL to your statement and the permissions issue should go away. Like so:

LOAD DATA LOCAL INFILE '{$file}' INTO TABLE {$table}

这篇关于拒绝访问MySQL中的加载数据infile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆