mysql-error-1045 - MYSQL进入 outfile"access denied",但我的用户有"ALL" 访问权限 文件夹是 CHMOD 777

  显示原文与译文双语对照的内容
0 0

有什么想法吗?


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)

时间: 原作者:

0 0

尝试执行这里SQL命令:


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

似乎你在连接数据库时遇到问题,而不是写到你要提的文件夹。

同时,确保你已经将 FILE 授予用户 'asdfsdf'@'localhost'


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

原作者:
0 0

老实说,我没有费心处理拨款,即使没有特权也能奏效:


echo"select * from employee" | mysql --host=HOST --port=PORT --user=UserName --password=Password DATABASE.SCHEMA> output.txt

原作者:
...