home / skills / pluginagentmarketplace / custom-plugin-sql / mysql

mysql skill

/skills/mysql

This skill helps you administer and optimize MySQL databases, enabling efficient query tuning, replication setup, and reliable backups.

npx playbooks add skill pluginagentmarketplace/custom-plugin-sql --skill mysql

Review the files below or copy the command above to add this skill to your agents.

Files (6)
SKILL.md
1.1 KB
---
name: mysql
description: MySQL database administration and development
sasmp_version: "1.3.0"
bonded_agent: 02-postgresql-dba
bond_type: PRIMARY_BOND
---

# MySQL Skill

## Overview
Master MySQL database administration, optimization, and development for production environments.

## Topics Covered

### MySQL Basics
- Installation and configuration
- User management
- Database creation
- Storage engines (InnoDB, MyISAM)
- Character sets

### Query Development
- SELECT statements
- JOINs and subqueries
- INSERT, UPDATE, DELETE
- Stored procedures
- Triggers and events

### Performance
- EXPLAIN analysis
- Index optimization
- Query cache (8.0+ changes)
- Slow query log
- Performance Schema

### Administration
- Backup with mysqldump
- Binary log management
- Replication setup
- User privileges
- Configuration tuning

### High Availability
- MySQL replication
- Group replication
- MySQL Router
- ProxySQL
- Failover strategies

## Prerequisites
- SQL fundamentals
- Linux basics
- Networking concepts

## Learning Outcomes
- Administer MySQL servers
- Optimize queries
- Set up replication
- Manage backups

Overview

This skill teaches MySQL database administration, optimization, and development for production environments. It focuses on practical tasks like installation, backup, replication, and query tuning to keep databases reliable and performant.

How this skill works

It inspects schema design, query patterns, server configuration, and runtime diagnostics to recommend improvements. The skill provides step-by-step guidance for tasks such as setting up replication, analyzing EXPLAIN output, tuning indexes, and configuring backups.

When to use it

  • Setting up a new MySQL server or tuning an existing instance for production
  • Diagnosing slow queries and optimizing index and execution plans
  • Designing schemas and choosing appropriate storage engines and character sets
  • Implementing backup strategies and configuring binary logs or point-in-time recovery
  • Configuring replication, group replication, or failover for high availability

Best practices

  • Use EXPLAIN to analyze query execution plans before adding indexes
  • Prefer InnoDB for transactional workloads and enable proper innodb_buffer_pool_size
  • Keep backups automated and test restores regularly using mysqldump or physical copies
  • Limit privileges with least-privilege user accounts and audit changes
  • Monitor slow query log and Performance Schema for proactive performance tuning

Example use cases

  • Optimize a slow reporting query by identifying missing indexes and rewriting joins
  • Migrate a single-master setup to group replication for automated failover
  • Design a multi-tenant schema with appropriate character sets and indexing strategies
  • Automate daily backups and configure binary log retention for point-in-time recovery
  • Tune server parameters (buffer pool, connection limits) for higher concurrency

FAQ

What prerequisites do I need?

Basic SQL knowledge, familiarity with Linux command line, and networking fundamentals are recommended.

Which storage engine should I use?

Use InnoDB for most transactional and high-concurrency workloads; consider MyISAM only for specific read-heavy, non-transactional cases.