千家信息网

数据库运维平台

发表于:2026-10-31 作者:千家信息网编辑
千家信息网最后更新 2026年10月31日,数据库运维平台Inception_web 版安装前言Inception是集审核SQL、执行SQL、回滚于一体的一个自动化数据库运维系统环境:系统: centos 6.8Ip: 192.168.137.
千家信息网最后更新 2026年10月31日数据库运维平台

数据库运维平台Inception_web 版安装

前言

Inception是集审核SQL、执行SQL、回滚于一体的一个自动化数据库运维系统

环境:

系统: centos 6.8

Ip: 192.168.137.38

Python:Python2.7

部署步骤:

# cd /usr/src/

#wget https://github.com/mysql-inception/inception/archive/master.zip

#unzip master.zip

#yum -y install gcc gcc-c++ cmake bison openssl-devel ncurses-devel mysql-devel

#cd inception-master

#./inception_build.sh debug [Xcode] #[Xcode] 指定平台 默认linux

#echo $? #返回0,则为成功

#编辑配置文件,如果没有就创建

#vim /etc/inc.cnf

[inception]

general_log=1

general_log_file=inc.log

port=6669

socket=/tmp/inc.socket

character-set-client-handshake=0

character-set-server=utf8

inception_remote_system_password=admin

inception_remote_system_user=myadmin

inception_remote_backup_port=3308

inception_remote_backup_host=127.0.0.1

inception_support_charset=utf8

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=/usr/bin

inception_osc_chunk_time=0.1

inception_ddl_support=1

inception_enable_blob_type=1

inception_check_column_default_value=1

#先按esc,然后同时按shift跟:输入wq!保存退出

#下面的要根据自己解压压缩包文件目录进行运行,加载文件

#/usr/src/inception-master/debug/mysql/bin/Inception --defaults-file=/etc/inc.cnf &

#登录mysql

#mysql -uroot -h227.0.0.1 -P 6669

#在mysql里面输入以下命令

#inception get variables;

#升级Python为2.7

#cd /usr/src/

#wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz

#tar -xf Python-2.7.3.tgz

#cd Python-2.7.3

#./configure --prefix=/usr/local/python27

#echo $?

#make && make install

#echo $?

#mv /usr/bin/python /usr/bin/python26

#ln -s /usr/local/python27/bin/python2.7 /usr/bin/python

#vim /usr/bin/yum

#把#!/usr/bin/python改为#!/usr/bin/python26

#输入Python看是不是2.7 ,然后exit()退出,输入yum list,看看yum源是否正常

#cd /usr/src/

#wget https://bootstrap.pypa.io/ez_setup.py --no-check-certificate

#python ez_setup.py

#[root@localhost ~]# find / -name easy_install-2.7

/usr/local/python27/bin/easy_install-2.7

#cd /usr/local/python27/bin/

#./easy_install-2.7 pip

#echo $?

#[root@localhost bin]# find / -name pip2.7

/usr/local/python27/bin/pip2.7

#./pip2.7 install flask_wtf

#./pip2.7 install flask-script

#./pip2.7 install flask-debugtoolbar

#./pip2.7 install MySQL-python

#cd /usr/src/

#yum install git

#git clone https://github.com/dbalihui/inception_web.git

#cd inception_web/app/

#vim inception.py #(注意:红色部分为自己定义部分)

coding=utf-8

import MySQLdb

def table_structure(mysql_structure):

sql1='/*--user=root;--password=root;--host=127.0.0.1;--execute=1;--port=3306;*/\

inception_magic_start;\

use test_3;'

sql2='inception_magic_commit;'

sql = sql1 + mysql_structure + sql2

try:

conn=MySQLdb.connect(host='127.0.0.1',user='root',passwd='root',db='test_3',port=6669,use_unicode=True, charset="utf8")

cur=conn.cursor()

ret=cur.execute(sql)

result=cur.fetchall()

num_fields = len(cur.description)

field_names = [i[0] for i in cur.description]

print field_names

for row in result:

print row[0], "|",row[1],"|",row[2],"|",row[3],"|",row[4],"|",row[5],"|",row[6],"|",row[7],"|",row[8],"|",row[9],"|",row[10]

cur.close()

conn.close()

except MySQLdb.Error,e:

print "Mysql Error %d: %s" % (e.args[0], e.args[1])

return result[1][4].split("\n")

#cd .. #返回上一层

# ./run.py runserver --host 192.168.137.38 & #自己的服务器ip

浏览器输入:ip:5000 例如:192.168.137.38:5000

#vim /etc/sysconfig/iptables #开放3306,5000端口

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

-A INPUT -m state --state NEW -m tcp -p tcp --dport 5000 -j ACCEPT

#service iptables restart


输入 文件 平台 数据 数据库 系统 成功 于一体 前言 同时 命令 服务器 步骤 浏览器 环境 目录 端口 红色 部分 面的 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 互联网金融科技 南京欣网互联网络科技 互联网科技工作委员会副主任毛军 互联网科技巨头监管 互联网络科技有限公司 狮子座互联网科技 互联网科技股午盘股票涨跌 农村开互联网科技讲堂 须眉科技是互联网公司吗 互联网科技中介 受益于互联网科技的高速发展 移动互联网科技公司 互联网公司黑科技创始人 徐州市互联网科技有限公司 上海京穆互联网科技有限公司 张召忠谈中国互联网科技 易企秀互联网科技是做什么的 玉溪新华互联网科技怎么选 恒生科技指数 中概互联网 优雇互联网科技有限公司 互联网科技海报 互联网科技公司税收优惠 互联网与科技发展 中国互联网科技发展 腾讯科技 互联网女皇 晓花互联网科技有限公司网址 996高科技互联网公司 湖北辰鑫科技互联网 上海万顺科技互联网有限公司招聘 北京瑞云互联网科技有限公司
0