About this project

Yearning is an open-source, locally deployed SQL audit platform focused on MySQL. It is aimed at DBAs and developers who need controlled, auditable database change and query processes, and it emphasizes privacy by keeping database credentials and SQL statements within the user's own environment. Core capabilities documented in the project: - SQL audit: SQL statements are submitted as audit tickets that pass through approval workflows. An automated syntax checker validates statements against a configurable set of check rules covering correctness, security, and compliance. For DDL and DML operations, rollback statements are generated automatically, and a history log preserves traceability of changes. - Query audit: the platform audits user queries, can restrict which data sources and databases are accessible, and anonymizes sensitive fields. Query records are saved for future reference and compliance review. - AI assistant: built on a large language model, it provides SQL optimization suggestions and converts natural-language input into SQL (text-to-SQL). Both default and custom prompts are supported. - Query editing: SQL syntax highlighting and auto-completion help users visually distinguish keywords, table names, column names, and operators, making query structure easier to read and write. - Access control: role-based access control (RBAC) allows administrators to create roles with specific permissions and restrict access to query work orders, auditing functions, and other sensitive operations. - Security: the project includes encryption mechanisms intended to protect sensitive data even in the event of unauthorized access. Deployment and technical details: Yearning is written in Go and distributed as a single binary or as a Docker image (yeelabs/yearning), with support for x86/x64 and ARM architectures. Installation involves downloading a release, configuring config.toml, running ./Yearning install to initialize the database, and then ./Yearning run to start the service. Docker deployments pass MySQL connection details (address, user, password, database) and a SECRET_KEY via environment variables, with the web interface served on port 8000 and language options such as zh_CN. The project is licensed under AGPL-3.0. Documentation is available at next.yearning.io, and the repository provides READMEs in English, Simplified Chinese, and Japanese. The README also recommends Spug, an open-source lightweight automation operations platform, as a related tool.