How to Streamline MySQL Audits with the Open‑Source Yearning Platform
Yearning is an open‑source MySQL audit platform that offers query auditing, SQL review, and workflow automation, providing a web‑based interface for managing tickets, permissions, and notifications, with detailed installation and configuration instructions for quick deployment.
Introduction
Yearning is an open‑source SQL statement audit platform that focuses on MySQL, offering query auditing, SQL review, and a range of functions that help bridge the gap between operations and development teams.
Key Features
SQL query, export, auto‑completion
Workflow‑based SQL review, ticket handling, execution, rollback
Historical audit records
Query auditing
Email, DingTalk webhook, and robot notifications
LDAP login, fine‑grained permission management (12 independent permissions)
Modules
Dashboard – displays user count, data source count, ticket count, query count and other charts; allows password, email, and real‑name changes, and shows user permissions.
My Tickets – shows submitted tickets, allows editing failed/rejected tickets, and provides rollback statements for successful tickets.
Work Order DLL – DDL submission, table/ index view, syntax highlighting, auto‑completion.
DML Review – DML submission, syntax highlighting, auto‑completion.
Query – query/export data with syntax highlighting and quick DML submission.
Work Order Review – administrator review and execution of DDL/DML.
Query Review – user query review.
Permission Review – user permission audit.
User Management – create/modify/delete users.
Database Management – add/edit/delete data sources.
Settings – configure message push (DingTalk robot/email), LDAP, global settings, and enable/disable switches.
Audit Rules – define SQL detection rules.
Audit Process
Yearning supports both two‑level and multi‑level review modes. In two‑level mode, a user submits a DDL/DML ticket, an administrator reviews and either executes or rejects it, and the execution record is stored under the administrator’s account. In multi‑level mode, after the administrator’s approval the ticket is assigned to an executor, who then executes or rejects it, with the execution record stored under the executor’s account.
Installation
Yearning does not depend on any third‑party SQL audit tools; it only requires MySQL 5.7+ with UTF‑8/UTF8mb4 charset. After creating a database named Yearning, edit the configuration file as follows, initialize the database, and start the service. The default login is admin/Yearning_admin.
cat conf.toml
[Mysql]
Db = "Yearning"
Host = "127.0.0.1"
Port = "3306"
Password = "xxxx"
User = "root"
[General] # database encryption key, can be set only once.
SecretKey = "dbcjqheupqjsuwsm"Run ./Yearning -m to initialize the database, then launch the service. Access the web UI via a browser; the application is optimized for 1080p+ displays.
Conclusion
Yearning provides a functional MySQL audit solution with a web UI, helping to streamline SQL review and execution, though it currently supports only MySQL.
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.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
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.
