安装MySQL管理平台Yearning-小白教程

mac2025-11-11  9

1: 安装Nginx服务器

可以看我之前的文章: Nginx

2: 安装MySQL服务器

可以看我之前的文章: MySQL

3:安装 Python3.6
cd /service/tools/ wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz

解压

mkdir -p /usr/local/python3 tar -avxf Python-3.6.4.tgz -C /usr/local/python3/

进行配置

cd /usr/local/python3/ ./configure --prefix=/usr/local/python3 make && make install

建立软连接

ln -s /usr/local/python3/bin/python3 /usr/bin/python3 ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip3
安装 bison
cd /application/tools wget http://ftp.gnu.org/gnu/bison/bison-2.5.tar.bz2 tar xf bison-2.5.tar.bz2 cd bison-2.5 ./configure --prefix=/usr/local && make && make install **安装报错解决方法:** ** 注释掉643这一行 ** /*_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");*/ **原处添加下面3行** #if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif

重新安装

make && make install
安装inception
cd /usr/local/ wget https://github.com/mysql-inception/inception/archive/master.zip unzip master.zip cd inception-master/ sh inception_build.sh builddir linux

修改配置

cat /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的库,也用作备份库 inception_remote_system_password=123456 inception_remote_system_user=root inception_remote_backup_port=3306 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 ###################

启动服务

nohup /usr/local/inception-master/builddir/mysql/bin/Inception --defaults-file=/etc/inc.cnf &

如果显示下文

(inception_env) [root@localhost inception-master]# mysql -uroot -h127.0.0.1 -P 6669 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: Inception2.1.50 1 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. # 有如下输出即可 MySQL [(none)]> inception get variables; +------------------------------------------+---------------------------------------------+ | Variable_name | Value | +------------------------------------------+---------------------------------------------+ | autocommit | OFF | | bind_address | * | | character_set_system | utf8 | | character_sets_dir | /usr/local/inception-master/share/charsets/ | | connect_timeout | 10 | | date_format | %Y-%m-%d | | datetime_format | %Y-%m-%d %H:%i:%s | | general_log | ON | | general_log_file | inc.log | | inception_check_autoincrement_datatype | ON | | inception_check_autoincrement_init_value | ON | | inception_check_autoincrement_name | ON | | inception_check_column_comment | ON | | inception_check_column_default_value | ON | | inception_check_dml_limit | ON | | inception_check_dml_orderby | ON | | inception_check_dml_where | ON | | inception_check_identifier | ON | | inception_check_index_prefix | ON | | inception_check_insert_field | ON | | inception_check_primary_key | ON | | inception_check_table_comment | ON | | inception_check_timestamp_default | ON | | inception_ddl_support | ON | | inception_enable_autoincrement_unsigned | ON | | inception_enable_blob_type | ON | | inception_enable_column_charset | OFF | | inception_enable_enum_set_bit | OFF | | inception_enable_foreign_key | OFF | | inception_enable_identifer_keyword | OFF | | inception_enable_not_innodb | OFF | | inception_enable_nullable | OFF | | inception_enable_orderby_rand | OFF | | inception_enable_partition_table | OFF | | inception_enable_pk_columns_only_int | OFF | | inception_enable_select_star | OFF | | inception_enable_sql_statistic | ON | | inception_max_char_length | 16 | | inception_max_key_parts | 5 | | inception_max_keys | 16 | | inception_max_primary_key_parts | 5 | | inception_max_update_rows | 10000 | | inception_merge_alter_table | ON | | inception_osc_alter_foreign_keys_method | none | | inception_osc_bin_dir | /usr/bin | | inception_osc_check_alter | ON | | inception_osc_check_interval | 5.000000 | | inception_osc_check_replication_filters | ON | | inception_osc_chunk_size | 1000 | | inception_osc_chunk_size_limit | 4.000000 | | inception_osc_chunk_time | 0.100000 | | inception_osc_critical_thread_connected | 1000 | | inception_osc_critical_thread_running | 80 | | inception_osc_drop_new_table | ON | | inception_osc_drop_old_table | ON | | inception_osc_max_lag | 3.000000 | | inception_osc_max_thread_connected | 1000 | | inception_osc_max_thread_running | 80 | | inception_osc_min_table_size | 1 | | inception_osc_on | ON | | inception_osc_print_none | ON | | inception_osc_print_sql | ON | | inception_osc_recursion_method | processlist | | inception_password | | | inception_read_only | OFF | | inception_remote_backup_host | 127.0.0.1 | | inception_remote_backup_port | 3306 | | inception_remote_system_password | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | inception_remote_system_user | root | | inception_support_charset | utf8 | | inception_user | | | interactive_timeout | 28800 | | max_allowed_packet | 1073741824 | | max_connect_errors | 100 | | max_connections | 151 | | net_buffer_length | 16384 | | net_read_timeout | 30 | | net_write_timeout | 60 | | port | 6669 | | query_alloc_block_size | 8192 | | query_prealloc_size | 8192 | | socket | /tmp/inc.socket | | thread_handling | one-thread-per-connection | | thread_stack | 262144 | | time_format | %H:%i:%s | | version | Inception2.1.50 | | version_comment | Source distribution | | version_compile_machine | x86_64 | | version_compile_os | Linux | | wait_timeout | 28800 | +------------------------------------------+---------------------------------------------+ 90 rows in set (0.00 sec)

表示安装成功

下载Yearning

git clone https://github.com/cookieY/Yearning.git

进行解压

unzip Yearning-2.1.5.linux-amd64.zip cd Yearning-go

配置连接

vim conf.toml [Mysql] Db = "Yearning" Host = "127.0.0.1" Port = "3306" Password = "123456" User = "sea" [General] SecretKey = "dbcjqheupqjsuwsm"

创建使用的数据库

create database Yearning DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

启动

./Yearning -m

提示

初始化成功! 用户名: admin 密码:Yearning_admin

表示安装成功

启动

./Yearning -s -b "10.211.55.40" -p "8000" &
最新回复(0)