Inception deployment testing
Welcome to reprint, please indicate the author and source. Author: Liu Chunlei blog: http://blog.itpub.net/28823725/
If you have any questions, please leave a message.
Inception deployment Test-Liu Chunlei 20170801
If you want to learn inception, if you want to learn flask~, then this article is suitable for you.
1. Download https://github.com/mysql-inception/inception2 and install yum-y install cmake libncurses5-dev libssl-dev gaming + bison openssl-devel.x86_64
Unzip inception-master.zip
Cd inception-master sh-x inception_build.sh debug
Cd / chunlei/inception/inception
Mkdir log
Mkdir etc
Add a configuration file after cd etc installation:
Vim inc.cnf [inception] general_log=1 general_log_file=/chunlei/inception/inception/log/inception.log port=7001 socket=/chunlei/inception/inception/inc.socket character-set-client-handshake=0 character-set-server=utf8 inception_remote_system_password=123456 inception_remote_system_user=root inception_remote_backup_port=6001 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=/chunlei/osc inception_osc_chunk_time=0.1 inception_ddl_support=1 inception_enable_blob_type=1 inception_check_column_default_value=13 、 Start / chunlei/inception/inception-master/debug/mysql/bin/Inception-- defaults-file=/chunlei/inception/inception/etc/inc.cnf &
Login: mysql-uroot-h227.0.0.1-P7001
Elcome to the MySQL monitor. Commands end with; or\ g. Your MySQL connection id is 2 Server version: Inception2.1.50 1
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Mysql > inception get variables; test
4. Interface: there is a packaged flask on the Internet. Download a web package on the Internet. The installation process is as follows: download address: https://github.com/dbalihui/inception_web
Install flask easy_install flask
Easy_install flask_wtf
Easy_install flask-script
Easy_install flask-debugtoolbar
Database creation library: create database sql_check creation user: GRANT ALL PRIVILEGES ON *. * TO 'dba'@'%' identified by' 123456'
Modify the configuration file cd / chunlei/inception/flask/inception_web-master/app vi inception.py modify: conn=MySQLdb.connect (host='127.0.0.1',user='dba',passwd='123456',db='sql_check',port=7001,use_unicode=True, charset= "utf8")
Run:. / run.py runserver-- host 172.16.16.2
Http://182.61.39.142:5000/
Test: create table test1 (id int auto_increment,name varchar (10), primary key (id))