
Mysql Patterns
This is a production-focused reference for MySQL and MariaDB work that covers schema design, indexing strategy, transaction patterns, and connection pooling. It starts with version checks because the two databases have diverged on syntax like upsert row aliases, then walks through composite index ordering, keyset pagination instead of deep offsets, queue patterns with SKIP LOCKED, and deadlock prevention through deterministic lock ordering. The examples are concrete, from DECIMAL for money to pool_recycle settings aligned with server wait_timeout. Useful when you're reviewing migrations on large tables, debugging lock waits, or setting up connection pools that won't leak or timeout under load.
- skills.sh installs
- 1.8K
- GitHub stars
- 229.1K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add affaan-m/everything-claude-code --skill mysql-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
MySQL Patterns
Use this skill when working on MySQL or MariaDB schema design, migrations, slow-query investigation, queue-style transactions, connection pools, or production database configuration. Prefer exact version checks before applying a feature-specific pattern because MySQL and MariaDB have diverged in several SQL details.
Activation
- Designing MySQL or MariaDB tables, indexes, and constraints
- Reviewing migrations before they run on large production tables
- Debugging slow queries, lock waits, deadlocks, or connection exhaustion
- Adding keyset pagination, upserts, full-text search, JSON columns, or queues
- Configuring application connection pools, read replicas, TLS, or slow logs
Version Check
Start by identifying the engine and version:
SELECT VERSION();
SHOW VARIABLES LIKE 'version_comment';
Keep MySQL and MariaDB guidance separate when syntax differs:
Sponsors
Details
- Repository
- github.com/affaan-m/everything-claude-code
- Categories
- Backend & APIs, Databases
- First seen
- Jun 3, 2026
More from affaan-m/everything-claude-code
All 256- Pubmed Database1.8K
- Windows Desktop E2e1.8K
- Agent Architecture Audit1.7K
- Agentic Os1.7K
- Angular Developer1.7K
- Cisco Ios Patterns1.7K
- Django Celery1.7K
- Ecc Guide1.7K
- Error Handling1.7K
- Flox Environments1.7K
- Frontend Design Direction1.7K
- Homelab Network Readiness1.7K
- Homelab Network Setup1.7K
- Ios Icon Gen1.7K
- Make Interfaces Feel Better1.7K
- Motion Advanced1.7K
- Motion Ui1.7K
- Netmiko Ssh Automation1.7K
- Network Bgp Diagnostics1.7K
- Network Config Validation1.7K
- Network Interface Health1.7K
- Plan Orchestrate1.7K
- Production Audit1.7K
- Project Guidelines Example1.7K