MYSQL 进入输出文件“拒绝访问"- 但我的用户有“全部"访问..文件夹是CHMOD 777

2021-11-20 00:00:00 mysql mysql-error-1045 into-outfile

有什么想法吗?

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)

推荐答案

尝试执行此 SQL 命令:

Try executing this SQL command:

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

您似乎在连接到数据库时遇到问题,但没有写入您提到的文件夹.

It seems that you are having issues with connecting to the database and not writing to the folder you’re mentioning.

另外,请确保您已将 FILE 授予用户 'asdfsdf'@'localhost'.

Also, make sure you have granted FILE to user 'asdfsdf'@'localhost'.

> GRANT FILE ON *.* TO 'asdfsdf'@'localhost';

相关文章