cookieY /Yearning

🐳 A most popular sql audit platform for mysql

★ 8,976⑂ 2,034👁 225⑃ 211● 1,002▤ 22
GoCreated 2017-10-18next.yearning.io/
+0
Daily
+0
Weekly
+7
Monthly
8,976
stars
2,034
forks
225
watchers
211
prs
1,002
issues
22
releases

README

Yearning



 A robust, locally deployed platform designed for seamless SQL detection and query auditing, tailored specifically for DBAs and developers. Focused on privacy and efficiency, it provides an intuitive and secure environment for MYSQL auditing.

---

!Platform Support?style=flat-square&logoColor=white&logo=linux)
[![][github-license-shield]][github-license-link]
!GitHub top language
[![][github-forks-shield]][github-forks-link]
[![][github-stars-shield]][github-stars-link]


English | 简体中文 | 日本語

 ✨ Features

- AI Assistant: Our AI assistant offers real-time SQL optimization suggestions, enhancing SQL performance. It also supports text-to-SQL conversion, allowing users to input natural language and receive optimized SQL statements.
  
- SQL Audit: Create SQL audit tickets with approval workflows and automated syntax checks. Validate SQL statements for correctness, security, and compliance. Rollback statements are automatically generated for DDL/DML operations, with a comprehensive history log for traceability.

- Query Audit: Audit user queries, restrict data sources and databases, and anonymize sensitive fields. Query records are saved for future reference.

- Check Rules: Our automated syntax checker supports a wide range of check rules, suitable for most automatic checking scenarios.

- Privacy Focused: Yearning is a locally deployable, open-source solution that ensures the security of your database and SQL statements. It includes encryption mechanisms to protect sensitive data, ensuring it remains secure even if unauthorized access occurs.

- RBAC (Role-Based Access Control): Create and manage roles with specific permissions, restricting access to query work orders, auditing functions, and other sensitive operations based on user roles.

 \[!TIP]
 For more detailed information, visit our Yearning Guide


 ⚙️ Installation

Download the latest release and extract it. Ensure you have configured ./config.toml before proceeding.

 Manual Installation

bash
 Initialize the database
./Yearning install

 Start Yearning
./Yearning run

 Help
./Yearning --help


 🚀 Deploying with Docker
[![][docker-release-shield]][docker-release-link]
[![][docker-size-shield]][docker-size-link]
[![][docker-pulls-shield]][docker-pulls-link]
bash
 Initialize the database
docker run --rm -it -p8000:8000 -e SECRET_KEY=$SECRET_KEY -e MYSQL_USER=$MYSQL_USER -e MYSQL_ADDR=$MYSQL_ADDR -e MYSQL_PASSWORD=$MYSQL_PASSWORD -e MYSQL_DB=$Yearning_DB -e Y_LANG=zh_CN yeelabs/yearning "/opt/Yearning install"

 Start Yearning
docker run -d -it -p8000:8000 -e SECRET_KEY=$SECRET_KEY -e MYSQL_USER=$MYSQL_USER -e MYSQL_ADDR=$MYSQL_ADDR -e MYSQL_PASSWORD=$MYSQL_PASSWORD -e MYSQL_DB=$Yearning_DB -e Y_LANG=zh_CN yeelabs/yearning

 🤖 AI Assistance

Our AI Assistant leverages a large language model to provide SQL optimization suggestions and text-to-SQL conversion. Whether using default or custom prompts, the AI Assistant enhances SQL performance by optimizing statements and converting

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON