MySQL查询去除边框,转为xml或html方法

我们来看一下,mysql的help

  -H, --html          Produce HTML output.
  -X, --xml           Produce XML output
  -r, --raw           Write fields without conversion. Used with --batch.
  --reconnect         Reconnect if the connection is lost. Disable with
                      --disable-reconnect. This option is enabled by default.
  -s, --silent        Be more silent. Print results with a tab as separator,
                      each row on new line.

1,去除边框
mysql -s -r 就不显示原来的边框,方便下一步处理结果

2,html table方式显示结果
mysql -H 这个方便做些监控结果使用,邮件直接查看

3,xml结果
mysql -X 哈哈,这个可以直接做个数据接口使用
posted @ 2016-03-02 19:10  arun_yh  阅读(1169)  评论(0编辑  收藏  举报