数据表结构导出md表格工具:mysql_markdown

用途

将数据库的表结构导出未markdown表格,这样我只用维护数据库的备注,然后每次更新文档的时候从数据库里导出表格:

项目地址

使用方法

root@ceph03:/home/bill# ./mysql_markdown_unix -h
flag needs an argument: -h
Usage: mysql_markdown [options...]
--help  This help text
-h      host.     default 127.0.0.1
-u      username. default root
-p      password. default root
-d      database. default mysql
-P      port.     default 3306
-c      charset.  default utf8
-o      output.   default current location
-t      tables.   default all table and support ',' separator for filter, every item can use regexp

// 导出tidb数据库里的tpcc数据库表结构
// tidb:192.168.1.93:4000  数据库名:tpcc  用户:root  密码:空
// 导出结果:tpcc_20210414_172002.md

root@ceph03:/home/bill# ./mysql_markdown_unix -h 192.168.1.93 -u root -p "" -P 4000 -d tpcc
1/9 the warehouse table is making ...
2/9 the customer table is making ...
3/9 the history table is making ...
4/9 the new_order table is making ...
5/9 the orders table is making ...
6/9 the order_line table is making ...
7/9 the stock table is making ...
8/9 the item table is making ...
9/9 the district table is making ...
mysql_markdown finished ...  
root@ceph03:/home/bill# ll
total 4.4M
drwxr-xr-x 2 root root 4.0K Apr 14 17:20 ./
drwxr-xr-x 6 root root 4.0K Apr 13 10:27 ../
-rwxr-xr-x 1 root root 4.3M Apr 14 17:12 mysql_markdown_unix*
-rw-r--r-- 1 root root 1.2K Apr 13 10:24 topo.yaml
-rwxr-xr-x 1 root root 5.8K Apr 14 17:20 tpcc_20210414_172002.md*

   转载规则


《数据表结构导出md表格工具:mysql_markdown》 bill 采用 知识共享署名 4.0 国际许可协议 进行许可。
 上一篇
lotus FullNodeAPI接口分析 lotus FullNodeAPI接口分析
1、FullNodeAPI全节点接口 source 1.1 Lotus JSON-RPC APIJSON-RPC是在JSON中对远程过程调用进行编码的标准化方法。比特币和以太坊等项目已将其用于其API。 Lotus使用通过HTTP或Web
2020-04-26
下一篇 
leetcode 268 丢失的数字(missing number) leetcode 268 丢失的数字(missing number)
0268 missing numberGiven an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing
  目录