π MySQLens
AI-powered MySQL performance optimization tool
See clearly. Optimize confidently.
Features β’ Quick Start β’ Docs β’ GitHub
π‘ What is MySQLens?
MySQLens is a production-ready MySQL performance optimization tool that combines real-time monitoring with AI-powered analysis. It helps database administrators and developers:
- π― Identify slow queries and performance bottlenecks
- π€ Get AI-powered optimization recommendations using OpenAI, Gemini, or local Ollama
- π Detect unused and redundant indexes wasting disk space
- π Monitor database health in real-time
β¨ Key Features
| Feature | Description |
|---|---|
| π Privacy-First | Run AI analysis locally with Ollama - no data leaves your machine |
| π― Real-time Monitoring | Live metrics for QPS, connections, buffer pool, and more |
| π€ Multi-LLM Support | OpenAI, Gemini, DeepSeek, or local Ollama |
| π Index Intelligence | Detect unused, duplicate, and missing indexes |
| π³ Docker-Ready | One-command deployment with Docker Compose |
| π Remote MySQL | Connect to any MySQL instance (local, cloud, RDS) |
π Quick Start
# Clone the repository
git clone https://github.com/a-kash-singh/mysqlens.git
cd mysqlens
# Configure LLM (Ollama for privacy, or cloud APIs)
echo "LLM_PROVIDER=ollama
OLLAMA_BASE_URL=http://host.docker.internal:11434
OLLAMA_MODEL=llama3.2:latest" > .env
# Start MySQLens
docker compose up -d
# Open in browser
open http://localhost:3000
π Need more details? Check out the complete Quick Start Guide.
ποΈ Architecture
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Next.js 15 βββββββΆβ FastAPI βββββββΆβ MySQL DB β
β Frontend β β Backend β β (Your DB) β
β (Port 3000) ββββββββ (Port 8080) ββββββββ β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
ββββββββββββββββ
β LLM APIs β
β (AI Power) β
ββββββββββββββββ
π Documentation
- π Quick Start Guide - Get started in 5 minutes
- π€ Ollama Setup - Local LLM configuration
- ποΈ Architecture - System design and tech stack
- π‘ API Reference - Complete API documentation
More on GitHub:
- π Full README - Complete documentation
- π’ Deployment Guide - Production deployment
- π Contributing - How to contribute
π Acknowledgments
This project is inspired by OptiSchema-Slim - an excellent PostgreSQL performance optimization tool by @arnab2001.
**Built with π for better MySQL performance**