title: How do you get table-formatted output from MySQL in non-interactive mode?
body: <p>I like the table output that the mysql client program produces in interactive mode, but if I try to run a sql script like this:</p>
  
  <pre><code>mysql -uroot mydb &lt; myscript.sql
  </code></pre>
  
  <p>I only get tab-separated output. </p>
  
  <pre><code>mysql -uroot mydb -e 'select * from mytable'
  </code></pre>
  
  <p>does produce the output in the desired table format, however.</p>
  
  <p>How can I get the first command to produce table-formatted output? I don't want HTML output, but the terminal character output with aligned columns and headers.</p>