I have an MySql query from which i generate a OUTFILE (.csv) which i save it in /tmp . Please find the query below :
SELECT 'Artifact ID' id, 'Related Links' new_value UNION select CONCAT(si.ID_PREFIX, si.ID_COUNT) as ID, tmp.NEW_VALUE from ( select ACTIVITY_ID, ISSUE_ID, OLD_VALUE, NEW_VALUE from SCARAB_ACTIVITY where ISSUE_ID in (select ISSUE_ID from SCARAB_ISSUE where MODULE_ID = 775) and (NEW_VALUE like 'http%') order by ACTIVITY_ID desc) tmp, SCARAB_ISSUE si where tmp.ISSUE_ID = si.ISSUE_ID INTO OUTFILE '/tmp/flexsustain_test_relatedlinks.csv' FIELDS ENCLOSED BY '' TERMINATED BY ',';
I have already tried to configure /etc/my.cnf file
[mysqld] datadir=/var/lib/mysql tmpdir = /var/lib/mysql/tmp socket=/var/lib/mysql/mysql.sock read-only = 0
and also i gave full permissions to tmpdir. But when i run the query not sure where the file is saved. Any suggestions ?