Inception介绍(MySQL自动化运维工具)

Inception介绍

GitHub:https://github.com/mysql-inception/inception

文档:https://mysql-inception.github.io/inception-document/install/

      Inception是集审核、执行、回滚于一体的一个自动化运维系统,它是根据MySQL代码修改过来的,用它可以很明确的,详细的,准确的审核MySQL的SQL语句,它的工作模式和MySQL完全相同,可以直接使用MySQL客户端来连接,但不需要验证权限,它相对应用程序(上层审核流程系统等)而言,是一个服务器,在连接时需要指定服务器地址及Inception服务器的端口即可,而它相对要审核或执行的语句所对应的线上MySQL服务器来说,是一个客户端,它在内部需要实时的连接数据库服务器来获取所需要的信息,或者直接在在线上执行相应的语句及获取binlog等,Inception就是一个中间性质的服务。

 

Inception安装(centos 6)

1、依赖包安装

yum install gcc gcc-c++ cmake bison openssl-devel ncurses-devel MySQL-python git -y

2、mysql client 安装

https://dev.mysql.com/downloads/repo/yum/ 下载yum库mysql57-community-release-el6-11.noarch.rpm

rpm -ivh mysql57-community-release-el6-11.noarch.rpm
  • 查看
yum list|grep mysql57
  • 安装
yum install mysql-community-client

3、Git下载源码包

git clone https://github.com/mysql-inception/inception.git

4、编译安装

cd inception
sh inception_build.sh debug

5、创建配置文件

vi /etc/inc.cnf
[inception]
general_log=1
general_log_file=inception.log
port=6669
socket=/tmp/inc.socket
character-set-client-handshake=0
character-set-server=utf8
inception_remote_system_password=root
inception_remote_system_user=wzf1
inception_remote_backup_port=3306
inception_remote_backup_host=127.0.0.1
inception_support_charset=utf8mb4
inception_enable_nullable=0
inception_check_primary_key=1
inception_check_column_comment=1
inception_check_table_comment=1
inception_osc_min_table_size=1
inception_osc_bin_dir=/data/temp
inception_osc_chunk_time=0.1
inception_enable_blob_type=1
inception_check_column_default_value=1

5、启动Inception程序

nohup /root/inception/debug/mysql/bin/Inception --defaults-file=/etc/inc.cnf --port=6669 &

6、测试

mysql -uroot -h127.0.0.1 -P6669

连接成功后执行 inception get variables;

输出了所有的变量,表示已经启动成功了。

 

posted @ 2018-02-24 09:43  shhnwangjian  阅读(5567)  评论(0编辑  收藏  举报