title: mysql & select into OUTFILE - writing binary data to file
body: <p>I have a table which has column of type binary.</p>
  
  <pre><code>---------------+---------+----------+-------------+
  | appid | imei             | request_timestamp | city_id | state_id | country_id  |
  +-------+------------------+-------------------+---------+----------+------------+-----------+
  | 45861 | 101111000110     |        1327119595 |     700 |       43 |          5      |
  | 93502 | 1000011001010    |        1327119595 |     305 |      490 |          9 |      |
  +-------+------------------+-------------------+---------+----------+------------+-------
  
  SELECT * INTO OUTFILE 'test.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'  LINES TERMINATED
   BY '\n'  FROM log_track_tbl_382 ,the csv file has data in the form 
  
  45861,"101111000110\0\0\0\0",1327119595,700,43,5
  93502,"1000011001010\0\0\0",1327119595,305,490,9
  </code></pre>
  
  <p>The binary column is not written to txt file in proper format.
  Can any one suggest what should be the proper mysql command to preserve binary data in the file .
  When i run this command from mysql prompt </p>