小编典典

MYSQL进入文件“访问被拒绝”-但是我的用户具有“所有”访问权限..并且文件夹是CHMOD 777

mysql

有任何想法吗?

SELECT * INTO OUTFILE '/home/myacnt/docs/mysqlCSVtest.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '*'
LINES TERMINATED BY '\n'
FROM tbl_property 
WHERE managerGroupID = {$managerGroupID}

错误:

Access denied for user 'asdfsdf'@'localhost' (using password: YES)

阅读 513

收藏
2020-05-17

共1个答案

小编典典

尝试执行以下SQL命令:

> grant all privileges 
  on YOUR_DATABASE.* 
  to 'asdfsdf'@'localhost' 
  identified by 'your_password';
> flush privileges;

似乎您在连接数据库时遇到了问题,但未写入您提到的文件夹。

此外,请确保您已授予FILEuser 'asdfsdf'@'localhost'

> GRANT FILE ON *.* TO 'asdfsdf'@'localhost';
2020-05-17