Databases 5 min read

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.

Open Source Tech Hub
Open Source Tech Hub
Open Source Tech Hub
How Yearning Automates MySQL SQL Auditing and Rollback – A Complete Guide

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
└── Yearning

Configuration 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 install

To reinstall, delete all tables under the Yearning database first.

Start Service

./Yearning run
Open a browser at http://127.0.0.1:8000 with default credentials admin/Yearning_admin .
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

GomysqlVue.jsDatabase SecuritySQL audit
Open Source Tech Hub
Written by

Open Source Tech Hub

Sharing cutting-edge internet technologies and practical AI resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.