Introduction
Yearning is a self-hosted MySQL SQL audit platform that adds a review and approval workflow to database changes. It targets teams that need controlled access to production databases with full audit trails and automated SQL syntax checking.
What Yearning Does
- Provides a web UI for submitting, reviewing, and executing SQL changes
- Enforces approval workflows before SQL runs against production databases
- Checks SQL syntax and performance implications before execution
- Supports role-based access control with separate DBA and developer roles
- Maintains complete audit logs of all queries and schema changes
Architecture Overview
Yearning is a Go application with a Vue.js frontend. It connects to target MySQL databases through a connection pool and proxies all SQL operations through its audit engine. The audit engine validates statements against configurable rules (naming conventions, index requirements, dangerous operations) before allowing execution.
Self-Hosting & Configuration
- Deploy with Docker using the official image for quick setup
- Configure MySQL connection details for each target database
- Set up LDAP or local authentication for user management
- Define audit rules for SQL validation (naming, indexing, etc.)
- Configure approval chains with required reviewer counts
Key Features
- SQL syntax validation with customizable rule sets
- Multi-level approval workflow (developer, reviewer, DBA)
- Query result export to CSV and Excel
- Auto-completion and syntax highlighting in the SQL editor
- Scheduled SQL execution for maintenance windows
Comparison with Similar Tools
- DBeaver — general database client; Yearning adds audit and approval workflows
- Bytebase — schema migration focus; Yearning focuses on ad-hoc SQL audit
- Archery — similar SQL audit tool; Yearning has a more modern UI and active maintenance
- Chat2DB — AI-powered queries; Yearning focuses on governance and audit compliance
FAQ
Q: Does Yearning support databases other than MySQL? A: Currently Yearning focuses on MySQL and MariaDB. PostgreSQL support is community-requested.
Q: Can I integrate Yearning with my CI/CD pipeline? A: Yes. Yearning provides a REST API for programmatic SQL submission and approval status checks.
Q: How does the approval workflow work? A: Developers submit SQL statements, reviewers validate them, and DBAs execute approved changes against the target database.
Q: Is there support for scheduled execution? A: Yes. Approved SQL can be scheduled to run during defined maintenance windows.