Looking for a way to Query data from MySQL database & write it to a output txt file. I am trying to query a Linux server db from a remote windows box.
MySQL Query:
mysql -u XXX -pXXX -h ttplxapp-esm01.abc.com -D telalert -e "select max(convert_tz(start_time,\"+00:00\",\"-04:00\")) AS Time,group_concat(username SEPARATOR \" \") AS Contact, message AS Message from sends where convert_tz(start_time,\"+00:00\",\"-4:00\") like \"$query_date%\" group by alert_id order by Time desc ;"
A java script or script will be ideal.