Yearning is a free, open source cloud infrastructure management project written in Go and released under AGPL-3.0. It has 8,972 GitHub stars, 2,032 forks and 165 open issues, and was last pushed 25 days ago. On this registry it ranks #24 of 70 tracked projects in Cloud Infrastructure Management, with 5 head-to-head comparisons available.

What is Yearning?

Yearning is a locally deployed, open-source SQL audit and query-auditing platform for MySQL, built in Go and aimed at DBAs and developers who need SQL review, approval workflows and query control inside their own infrastructure.

What it is

Yearning is a self-hosted web platform for SQL detection and query auditing, written in Go and distributed under the AGPL-3.0 licence. It runs entirely inside the operator's own environment rather than as a hosted service, and it is designed specifically for MySQL. Its stated focus is privacy and efficiency: the README describes it as an open-source, locally deployable solution that keeps database credentials and SQL statements inside the organisation, with encryption mechanisms intended to protect sensitive data even if unauthorised access occurs.

The concrete problem it replaces is the informal, unbounded path by which SQL reaches production. Instead of developers sending statements to DBAs over chat or ticket systems and DBAs eyeballing them, Yearning turns SQL change and query access into a controlled workflow: audit tickets with approval steps, automated syntax and rule checks against predefined standards, and a query layer that restricts which data sources and databases a user may touch. It also replaces uncontrolled read access with audited, anonymised querying, since query records are saved and sensitive fields can be masked. For DDL and DML operations it generates rollback statements automatically and keeps a history log for traceability.

Key capabilities

  • SQL audit tickets with approval workflows and automated syntax checks, validating statements for correctness, security and compliance.
  • Automatic rollback generation for DDL and DML operations, plus a comprehensive history log for traceability.
  • Query audit: restricts data sources and databases, anonymises sensitive fields, and saves query records for later reference.
  • Check rules: an automated syntax checker supporting a wide range of rules, covering most automatic checking scenarios.
  • RBAC: create and manage roles with specific permissions, restricting access to query work orders, auditing functions and other sensitive operations.
  • AI Assistant: real-time SQL optimisation suggestions and text-to-SQL conversion, turning natural language input into optimised SQL statements.
  • Privacy and encryption: locally deployable design with encryption mechanisms protecting sensitive data.
  • SQL syntax highlighting and auto-completion for query writing.

Who users are and how they work

  • DBA teams running MySQL estates that need every schema change to pass an approval gate before execution.
  • Development teams submitting SQL change tickets, receiving automated syntax-check feedback and rollback statements alongside the approval.
  • Security- or compliance-driven organisations that require query-level audit records and field anonymisation for read access.
  • Administrators managing role definitions through RBAC, scoping who may open query work orders and who may approve.
  • Operators needing text-to-SQL conversion and optimisation hints during query authoring, via the AI Assistant.

Getting started

Download the latest release, extract it, configure ./config.toml, then run ./Yearning install followed by ./Yearning run. Docker is also supported via the yeelabs/yearning image on port 8000, passing SECRET_KEY, MYSQL_USER, MYSQL_ADDR, MYSQL_PASSWORD and MYSQL_DB (and optionally Y_LANG), first with the /opt/Yearning install argument and then as a detached container.

How it compares

The provided facts list no paid products that Yearning replaces, and name no comparable tools. It stands alone in this registry on the evidence available.

When to use it โ€” and when not to

A self-hoster must operate an external MySQL instance for Yearning itself, set MYSQL_ADDR and related credentials, and maintain config.toml before installation. The AGPL-3.0 licence is copyleft and will matter to organisations with strict licence policies, and 165 open issues suggest an active but not immaculate tracker. Teams outside the MySQL ecosystem should look elsewhere, since the platform is MySQL-specific.

project readme (upstream, from github) โ€” read inline

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.


OSCS Status Platform Support GitHub top language Downloads

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

## Initialize the database
./Yearning install

## Start Yearning
./Yearning run

## Help
./Yearning --help

๐Ÿš€ Deploying with Docker

## 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 natural language inputs into SQL queries.

Text to SQL

๐Ÿ”– Automatic SQL Checker

The automatic SQL checker evaluates SQL statements against predefined rules and syntax. It ensures that statements adhere to specific coding standards, best practices, and security requirements, providing a robust layer of validation.

SQL Audit

๐Ÿ’ก SQL Syntax Highlighting and Auto-completion

Enhance your query writing efficiency with SQL syntax highlighting and auto-completion. These features help users visually distinguish different components of a SQL query, such as keywords, table names, column names, and operators, making it easier to read and understand the query structure.

SQL Query

โบ๏ธ Order/Query Record

Our platform supports the auditing of user order and query statements. This feature allows you to track and record all query operations, including data sources, databases, and the handling of sensitive fields, ensuring compliance with regulations and providing traceability for query history.

Order/Query Record

By focusing on these key features, Yearning enhances user experience, optimizes SQL performance, and ensures robust compliance and traceability in database operations.

๐Ÿ› ๏ธ Recommended Tools

โ˜Ž๏ธ Contact

For inquiries, please email us at: [email protected]

๐Ÿ“‹ License

Yearning is licensed under the AGPL license. See LICENSE for details.

2024 ยฉ Henry Yee


With Yearning, experience a streamlined, secure, and efficient approach to SQL auditing and optimization.

Frequently asked questions

Is Yearning free to use?

Yearning is open source under the AGPL-3.0 licence. There is no licence fee and no seat count โ€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Yearning do?

๐Ÿณ A most popular sql audit platform for mysql

What is Yearning written in?

Yearning is primarily written in Go. Its source is publicly available at https://github.com/cookieY/Yearning, and it has 8,972 GitHub stars.