title: Calculating bytes to MB
body: <p>The mysqladmin command returns the values in bytes. I will like to see the value in MB if it is greater than 1 MB (1048576 bytes).</p>
  
  <pre><code>$ mysqladmin variables
  +---------------------------------+----------------------------------+
  | Variable_name                   | Value                            |
  +---------------------------------+----------------------------------+
  | auto_increment_increment        | 1                                |
  | auto_increment_offset           | 1                                |
  ...
  | interactive_timeout             | 14400                            |
  | join_buffer_size                | 10481664                         |
  | key_buffer_size                 | 1073741824                       |
  </code></pre>
  
  <p>I can save and calculate each variable one at a time. But how do I show all the values in MB?</p>
  
  <pre><code>myval1=$(((`mysqladmin variables | grep '\&lt;key_buffer_size\&gt;' | awk '{print $4}'`)/1048576))
  </code></pre>