make a select to OUTFILE from unix shell

admin

Administrator
Staff member
Hi:

I need do the next select:

SELECT id,login INTO OUTFILE "/home/prueba/datawhlogin.txt" FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY "\n" FROM login;

it works on mysql prompt but, How can I do that from an unix shell??, because that select runs it from a cron daemon.

Thank you very much in advance.
 
Back
Top