access denied for load data infile in MySQL(在 MySQL 中加载数据 infile 的访问被拒绝)
问题描述
我一直在 PHP 中使用 MySQL 查询,但是当我尝试时
I use MySQL queries all the time in PHP, but when I try
LOAD DATA INFILE
我收到以下错误
#1045 - 用户 'user'@'localhost' 的访问被拒绝(使用密码:YES)
#1045 - Access denied for user 'user'@'localhost' (using password: YES)
有人知道这是什么意思吗?
Does anyone know what this means?
推荐答案
我也刚遇到这个问题.我不得不将 LOCAL 添加到我的 SQL 语句中.
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 的访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 MySQL 中加载数据 infile 的访问被拒绝
基础教程推荐
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 在多列上分布任意行 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
