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

MYSQL into outfile quot;access deniedquot; - but my user has quot;ALLquot; access.. and the folder is CHMOD 777(MYSQL 进入输出文件“拒绝访问- 但我的用户有“全部访问..文件夹是CHMOD 777)

本文介绍了MYSQL 进入输出文件“拒绝访问"- 但我的用户有“全部"访问..文件夹是CHMOD 777的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么想法吗?

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';

这篇关于MYSQL 进入输出文件“拒绝访问"- 但我的用户有“全部"访问..文件夹是CHMOD 777的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

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

基础教程推荐