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、依赖包安装
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
1 | rpm -ivh mysql57-community-release-el6-11.noarch.rpm |
- 查看
1 | yum list| grep mysql57 |
- 安装
1 | yum install mysql-community-client |
3、Git下载源码包
1 | git clone https: //github .com /mysql-inception/inception .git |
4、编译安装
1 2 | cd inception sh inception_build.sh debug |
5、创建配置文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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程序
1 | nohup /root/inception/debug/mysql/bin/Inception --defaults- file = /etc/inc .cnf --port=6669 & |
6、测试
1 | mysql -uroot -h127.0.0.1 -P6669 |
连接成功后执行 inception get variables;
输出了所有的变量,表示已经启动成功了。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】凌霞软件回馈社区,携手博客园推出1Panel与Halo联合会员
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记录一次线上问题排查:JDK序列化问题
· 微服务之间有哪些调用方式?
· 记一次SQL隐式转换导致精度丢失问题的排查
· dotnet 9 通过 AppHostRelativeDotNet 指定自定义的运行时路径
· 如何统计不同电话号码的个数?—位图法
· EF Core 10 现已支持 LeftJoin 和 RightJoin 运算符查询了!
· Python 3.14 t-string 要来了,它与 f-string 有何不同?
· 记录一次线上问题排查:JDK序列化问题
· 一个基于 C# Unity 开发的金庸群侠传 3D 版,直呼牛逼!
· SQL Server 2025 中的改进