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

后端 未结 6 1611
失恋的感觉
失恋的感觉 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条回答
  •  Happy的楠姐
    2020-11-28 04:38

    Honestly I didnt bother to deal with the grants and this worked even without the privileges:

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

提交回复
热议问题