πŸ” MySQLens

AI-powered MySQL performance optimization tool

License: MIT Docker Python Next.js Inspired by OptiSchema

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:

✨ 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

More on GitHub:

πŸ™ Acknowledgments

This project is inspired by OptiSchema-Slim - an excellent PostgreSQL performance optimization tool by @arnab2001.


**Built with πŸ” for better MySQL performance**

⭐ View on GitHub β€’ πŸ› Report Bug β€’ πŸ’¬ Discussions

⬆ Back to Top