{"id":1518,"date":"2010-08-16T09:29:10","date_gmt":"2010-08-16T03:59:10","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/2010\/08\/16\/mysql-publish-results-of-a-query-to-a-text-file\/"},"modified":"2010-08-16T09:32:32","modified_gmt":"2010-08-16T04:02:32","slug":"mysql-publish-results-of-a-query-to-a-text-file","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/","title":{"rendered":"MySql : Publish results of a query to a text file"},"content":{"rendered":"<p>A while back I was trying to debug an error in our application logic. For that I had to analyze the results of a query<\/p>\n<p>This analysis was getting pretty tough to do on the command line. So, I tried to find a way to transfer the results of a query to a text file so that they can be analysed easily.<\/p>\n<p>With help from google, I got my answer at <a href=\"http:\/\/www.wellho.net\/forum\/The-MySQL-Relational-Database\/MySQL-query-to-a-text-file.html\" target=\"_blank\">http:\/\/www.wellho.net\/forum\/The-MySQL-Relational-Database\/MySQL-query-to-a-text-file.html<\/a><\/p>\n<p><code>echo \"&lt;YOUR SELECT QUERY&gt;\"| \/usr\/local\/mysql\/bin\/mysql --user=root --password=password dbName &gt; \/path\/to\/your\/textFIle.txt<\/code>\/<\/p>\n<p>Hope this helps<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A while back I was trying to debug an error in our application logic. For that I had to analyze the results of a query This analysis was getting pretty tough to do on the command line. So, I tried to find a way to transfer the results of a query to a text file [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0},"categories":[1],"tags":[76],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/1518"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=1518"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/1518\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=1518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=1518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=1518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}