<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>letitride</author_name>
  <author_url>https://blog.hatena.ne.jp/letitride/</author_url>
  <blog_title>テックメモ跡地</blog_title>
  <blog_url>https://letitride.hatenablog.com/</blog_url>
  <categories>
    <anon>mysql</anon>
  </categories>
  <description>INTO OUTFILE ではうまくいかなかったので。まずは出力SQLを記述 $ vi /path/to/sqlfile.sql select ... ; -eでSQLをコンソール実行。awkでtsvをcsvに。 $ mysql database -hremotehost -uusername -ppassword -e &quot;`cat /path/to/sqlfile.sql`&quot; | awk '{gsub(&quot;\&quot;&quot;,&quot;\\\&quot;&quot;); $0=&quot;\&quot;&quot;$0&quot;\&quot;&quot;; gsub(&quot;\t&quot;, &quot;\&quot;,\&quot;&quot;); print $0}' &gt; /path/to/filename.csv</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fletitride.hatenablog.com%2Fentry%2F20160105%2F1451954131&quot; title=&quot;リモートRDSのSQL結果をcsv出力 - テックメモ跡地&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-01-05 09:35:31</published>
  <title>リモートRDSのSQL結果をcsv出力</title>
  <type>rich</type>
  <url>https://letitride.hatenablog.com/entry/20160105/1451954131</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
