How Yearning Automates MySQL SQL Auditing and Rollback – A Complete Guide
Yearning is an open-source MySQL SQL audit platform built with Go and Vue.js that automates statement review, generates rollback scripts, provides audit logging, supports multi-channel notifications, and offers fine-grained permission control, with installation instructions and configuration details for rapid deployment.
Introduction
In the data‑driven era, database security and stability are critical. Yearning is an open‑source MySQL SQL audit platform that provides automated review, rollback generation, and audit capabilities to help DBAs improve safety and efficiency.
Features
Automated SQL audit : Detects and reviews SQL statements automatically to ensure safety and compliance.
Rollback generation : Generates corresponding rollback statements after DDL/DML execution.
Audit logging : Records and queries all database activities.
Multi‑channel notifications : Supports LDAP login, DingTalk, email, etc., for timely alerts.
Customizable workflow : Allows users to define their own audit workflow.
Fine‑grained permission control : Provides detailed user permission management.
Technical Implementation
The backend is written in Go, offering concise syntax and high performance. The frontend uses Vue.js for a smooth, modern UI. Yearning is released under the AGPL‑3.0 license and can be run from a single compiled binary without additional plugins.
It parses MySQL syntax trees to automatically check statement conformity against built‑in audit rules.
Supported Syntax
Yearning supports about 99 % of standard MySQL SQL syntax. Known unsupported cases include complex multi‑table queries, foreign‑key statements, cross‑database DML rollback, and stored procedures/triggers.
Installation
Download
Binary packages are available at https://github.com/cookieY/Yearning/releases .
Yearning Mysql数据审核平台
Version: 3.1.5
__ __ _
\ \ / /__ __ _ _ __ __(_)_ __ __ _
\ V / _ \/ _` | '__/ _` | '_ \ / _` |
| | __/ (_| | | | (_| | | | | (_| |
|_|\___|\__,_|_| \__,_|_| |_|\__, |
|___/Directory Structure
.
├── conf.toml
├── docker
│ ├── docker-compose.yml
│ ├── Dockerfile
│ └── README.md
├── migrate
├── nohup.out
├── README.md
└── YearningConfiguration File
cat conf.toml
[Mysql]
Db = "Yearning"
Host = "127.0.0.1"
Port = "3306"
Password = "xxxx"
User = "root"
[General] # Database encryption key, can be changed only once.
SecretKey = "dbcjqheupqjsuwsm"Initialize and Install
./Yearning installTo reinstall, delete all tables under the Yearning database first.
Start Service
./Yearning runOpen a browser at http://127.0.0.1:8000 with default credentials admin/Yearning_admin .
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Tech Hub
Sharing cutting-edge internet technologies and practical AI resources.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
