MYSQL into outfile “access denied” - but my user has “ALL” access.. and the folder is CHMOD 777

后端 未结 6 1615
失恋的感觉
失恋的感觉 2020-11-28 04:04

Any ideas?

SELECT * INTO OUTFILE \'/home/myacnt/docs/mysqlCSVtest.csv\'
FIELDS TERMINATED BY \',\' OPTIONALLY ENCLOSED BY \'*\'
LINES TERMINATED BY \'\\n\'
         


        
6条回答
  •  醉话见心
    2020-11-28 04:46

    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.

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

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

提交回复
热议问题