{"id":1518,"date":"2010-08-16T09:29:10","date_gmt":"2010-08-16T03:59:10","guid":{"rendered":"https:\/\/2thenew.xyz\/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:\/\/2thenew.xyz\/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":3,"footnotes":""},"categories":[1],"tags":[76],"class_list":["post-1518","post","type-post","status-publish","format-standard","hentry","category-technology","tag-mysql"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"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\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Himanshu Seth\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"MySql : Publish results of a query to a text file | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"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\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"MySql : Publish results of a query to a text file | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"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\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mysql-publish-results-of-a-query-to-a-text-file\\\/#article\",\"name\":\"MySql : Publish results of a query to a text file | TO THE NEW Blog\",\"headline\":\"MySql : Publish results of a query to a text file\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2010-08-16T09:29:10+05:30\",\"dateModified\":\"2010-08-16T09:32:32+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mysql-publish-results-of-a-query-to-a-text-file\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mysql-publish-results-of-a-query-to-a-text-file\\\/#webpage\"},\"articleSection\":\"Technology, MySql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mysql-publish-results-of-a-query-to-a-text-file\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mysql-publish-results-of-a-query-to-a-text-file\\\/#listItem\",\"name\":\"MySql : Publish results of a query to a text file\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mysql-publish-results-of-a-query-to-a-text-file\\\/#listItem\",\"position\":3,\"name\":\"MySql : Publish results of a query to a text file\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/\",\"name\":\"Himanshu Seth\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mysql-publish-results-of-a-query-to-a-text-file\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/62e787d1a52267475ecb3fb2b7bea0715c3f4409cf080f75b5ee57e3bfa770a8?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Himanshu Seth\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mysql-publish-results-of-a-query-to-a-text-file\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mysql-publish-results-of-a-query-to-a-text-file\\\/\",\"name\":\"MySql : Publish results of a query to a text file | TO THE NEW Blog\",\"description\":\"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\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/mysql-publish-results-of-a-query-to-a-text-file\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\"},\"datePublished\":\"2010-08-16T09:29:10+05:30\",\"dateModified\":\"2010-08-16T09:32:32+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"MySql : Publish results of a query to a text file | TO THE NEW Blog","description":"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","canonical_url":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/#article","name":"MySql : Publish results of a query to a text file | TO THE NEW Blog","headline":"MySql : Publish results of a query to a text file","author":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/himanshu\/#author"},"publisher":{"@id":"https:\/\/2thenew.xyz\/blog\/#organization"},"datePublished":"2010-08-16T09:29:10+05:30","dateModified":"2010-08-16T09:32:32+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/#webpage"},"articleSection":"Technology, MySql"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.xyz\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/2thenew.xyz\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/#listItem","name":"MySql : Publish results of a query to a text file"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/#listItem","position":3,"name":"MySql : Publish results of a query to a text file","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.xyz\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.xyz\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.xyz\/blog\/author\/himanshu\/#author","url":"https:\/\/2thenew.xyz\/blog\/author\/himanshu\/","name":"Himanshu Seth","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/62e787d1a52267475ecb3fb2b7bea0715c3f4409cf080f75b5ee57e3bfa770a8?s=96&d=mm&r=g","width":96,"height":96,"caption":"Himanshu Seth"}},{"@type":"WebPage","@id":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/#webpage","url":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/","name":"MySql : Publish results of a query to a text file | TO THE NEW Blog","description":"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","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.xyz\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/himanshu\/#author"},"creator":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/himanshu\/#author"},"datePublished":"2010-08-16T09:29:10+05:30","dateModified":"2010-08-16T09:32:32+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.xyz\/blog\/#website","url":"https:\/\/2thenew.xyz\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.xyz\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"MySql : Publish results of a query to a text file | TO THE NEW Blog","og:description":"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","og:url":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/","og:image":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"MySql : Publish results of a query to a text file | TO THE NEW Blog","twitter:description":"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","twitter:image":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"1518","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 08:16:01","updated":"2024-02-29 11:00:21","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.xyz\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.xyz\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMySql : Publish results of a query to a text file\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.xyz\/blog"},{"label":"Technology","link":"https:\/\/2thenew.xyz\/blog\/category\/technology\/"},{"label":"MySql : Publish results of a query to a text file","link":"https:\/\/2thenew.xyz\/blog\/mysql-publish-results-of-a-query-to-a-text-file\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/1518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/comments?post=1518"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/1518\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/media?parent=1518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/categories?post=1518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/tags?post=1518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}