goInceptionMySQL運維工具
goInception是一個集審核、執(zhí)行、備份及生成回滾語句于一身的MySQL運維工具, 通過對執(zhí)行SQL的語法解析,返回基于自定義規(guī)則的審核結果,并提供執(zhí)行和備份及生成回滾語句的功能。
goInception延用inception的使用方式,在審核的sql開始前添加注釋來指定遠端服務器,并在sql的前后添加特殊標識以區(qū)分待審核語句,示例如下:
/*--user=root;--password=root;--host=127.0.0.1;--check=1;--port=3306;*/
inception_magic_start;
use test;
create table t1(id int primary key);
inception_magic_commit;
goInception基于TiDB的語法解析器,和業(yè)內有名的inpcetion審核工具重構。
源碼編譯
go version 1.12 (go mod)
git clone https://gitee.com/hanchuanchuan/goInception.git cd goInception make parser go build -o goInception tidb-server/main.go ./goInception -config=config/config.toml
評論
圖片
表情
