Yearning 2.X version installation, deployment and use

Yearning 2.X version installation and deployment

Digression

Yearning MYSQL SQL statement review platform. It is a tool for auditing and executing mysql statements, which is very convenient.

1. Introduction

Yearning MYSQL SQL statement review platform. Provide query audit, SQL audit and other functions.
Official website: https://guide.yearning.io

**主要功能**
	SQL查询
	查询导出
	查询自动补全
SQL审核
	流程化工单
	SQL语句检测
	SQL语句执行
	SQL回滚
	SQL自动审核执行
历史审核记录
查询审计
推送
	E-mail工单推送
	自定义webhook消息推送
其他
	LDAP登陆
	用户权限及管理
	权限组划分

After receiving the warning, immediately log in to the corresponding server:
check to confirm that the disk space is almost full, and check that the ibtmp1 file in the Mysql data directory has increased to more than 200G.

Two, installation and deployment

Note
Yearning does not rely on any third-party SQL audit tool as the audit engine, and has implemented audit/rollback related logic internally.

Only rely on Mysql database.

The mysql version must be 5.7 Support json type and above. Please install it yourself and create the Yearning library in advance. The character set should be UTF8mb4 (only the mysql version required by Yearning)

The Yearning log only outputs the error level. If there is no log, it can be considered that there is no operation error!

Yearning is developed based on 1080p resolution and only supports 1080p and above display access

Due to the use of more new front-end technology stacks, please use the latest version of Chrome (not including 360 and other magic modified versions).

Yearning download

Yearning-go provides binary download package:
Download address: https://github.com/cookieY/Yearning/releases
Select the latest version and select the Yearning-xxxlinux-amd64.zip package in Assets to download

Unzip and initialize

Modify the configuration file conf.toml according to the actual situation:

[Mysql]
Db = "yearning"
Host = "127.0.0.1"
Port = "3306"
Password = "555666"
User = "tt_dl"
[General]
SecretKey = "Ttcjqheupqjsuwsm"
Hours = 4

PS:
1. The connection can only be configured through TCP/iP, and sock cannot be used.
2. About SecretKey:

SecretKey是token/数据库密码加密/解密的salt。
建议所有用户在初次安装Yearning之前将SecretKey更改(不更改将存在安全风险)
格式: 大小写字母均可, 长度必须为16位

特别注意:
此key仅可在初次安装时更改!之后不可再次更改!如再次更改会导致之前已存放的数据源密码无法解密,最终导致无法获取相关数据源信息

./Yearning --help

[root@server05 Yearning-go]# ./Yearning --help
version: Yearning/2.2.2  GENERAL author: HenryYee
Usage: Yearning [-m migrate] [-p port] [-s start] [-b web-bind] [-h help] [-c config file]

Options:
 -s  启动Yearning
 -m  数据初始化(第一次安装时执行)
 -p  端口
 -b  钉钉/邮件推送时显示的平台地址
 -x  表结构修复,升级时可以操作。如出现错误可直接忽略。
 -h  帮助
 -c  配置文件路径
 -k  用户权限变更为权限组(2.1.7以下升级至2.1.7及以上使用)
 -f  初始化Admin用户密码

Initialize the data structure:

./Yearning -m
........

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

Be sure to perform the -m initialization operation before starting -s!
If you want to initialize again, please delete all tables under the yearning library first, otherwise repeated execution will be invalid

Three, start the service

Start by default

./Yearning -s &

Parameter start

./Yearning -s -b "192.168.81.133" -p "8000" &

Log in to the Yearning platform
http://192.168.81.133:8000/

Default password: admin/Yearning_admin (initialized generation)

Insert picture description here

At this point, the Yearning MYSQL SQL statement review platform has been built. Specific practices will be shared later.

Oh, not bad! ------Welcome to point out the mistakes and add better methods

Guess you like

Origin blog.csdn.net/Tah_001/article/details/108280471