title: Can't get stderr with Paramiko
body: <p>For some reasons, I have to use <code>mysql</code> over Paramiko.</p>
  
  <p>I have this (simplified) snippet:</p>
  
  <pre><code>stdin, stdout, stderr = c.exec_command("mysql stuff -e 'rename table foo to bar'")
  print stdout.read()
  print stderr.read()
  </code></pre>
  
  <p>But if table <code>foo</code> doesn't exist, I have no output (there is no <code>stdout</code> or <code>stdin</code> output). </p>
  
  <p>But it is strange, because:</p>
  
  <pre><code>stdin, stdout, stderr = c.exec_command("mysql stuff -e 'rename table foo to bar'")
  if stderr.read()
      print "Error: %s" % stderr.read()
      print type(stderr.read())
  </code></pre>
  
  <p>Has this output:</p>
  
  <pre><code>Error:
  &lt;type 'str'&gt;
  </code></pre>
  
  <p>Whereas the <code>mysql</code> error would normally be:</p>
  
  <blockquote>
    <p>ERROR 1017 (HY000) at line 1: Can't find file: './stuff/foo.frm' (errno: 2 - No such file or directory)</p>
  </blockquote>
  
  <p>I'd like to have this more verbose error output, but I can't have it. Why?</p>