mysql

mysql is a skill for Claude Code, Codex from BagelHole/DevOps-Security-Agent-Skills. It costs 24 tokens per session (2,780 once invoked), scanned D, original, MIT.

A guide to running MySQL and MariaDB, relational databases that store structured data in tables. It covers installation, replication, backups, security, and performance tuning.

In plain words
What is it for?
Use it to install and secure MySQL or MariaDB, create databases and users, configure replication, and tune InnoDB for busy applications.
Why use it?
It gives you a repeatable way to operate these databases in development and production. It helps reduce downtime, improve read capacity, and protect application data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to install and secure MySQL or MariaDB, create databases and users, configure replication, and tune InnoDB for busy applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bagelhole/devops-security-agent-skills/mysql
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill mysql
Clone the repo
git clone --depth 1 https://github.com/BagelHole/DevOps-Security-Agent-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mysql

README.md
[![agentmods](https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/mysql/github.svg)](https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/mysql)
Your own site
<a href="https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/mysql"><img src="https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/mysql/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mysql

Your own site · 80×15
<a href="https://agentmods.dev/skills/bagelhole/devops-security-agent-skills/mysql"><img src="https://agentmods.dev/badge/skills/bagelhole/devops-security-agent-skills/mysql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,780 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.02780
Opus 5 $0.00012 $0.01390
Sonnet 5 $0.00005 $0.00556
Haiku 4.5 $0.00002 $0.00278

Measured 7d ago against content hash 0f6eeaed9eaf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade D, and why

mysql scanned grade D with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Root or sudo access for package installation.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

sudo rm -rf /var/lib/mysql/*
infrastructure/databases/mysql/SKILL.md · 374 lines

How it starts

The opening of the file, as written. The whole thing — 374 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MySQL / MariaDB

Administer, optimize, and secure MySQL and MariaDB databases in development and production environments.

When to Use

  • You need a mature, widely supported relational database.
  • Your stack depends on MySQL-specific features or compatibility (WordPress, Magento, many PHP frameworks).
  • You are setting up source-replica replication for read scaling.
  • You want to tune InnoDB for high-throughput transactional workloads.

Prerequisites

  • Linux server (Debian/Ubuntu or RHEL-based) or Docker.
  • Root or sudo access for package installation.
  • Familiarity with SQL fundamentals.

Installation and Setup

# Debian / Ubuntu — MySQL 8
sudo apt update
sudo apt install -y mysql-server

# RHEL / Amazon Linux
sudo dnf install -y mysql-server
sudo systemctl enable --now mysqld

# Run the secure installation wizard
sudo mysql_secure_installation
# Prompts: set root password, remove anonymous users, disable remote root, remove test db

# Verify
mysql --version
sudo systemctl status mysql

Initial User and Database Setup

sudo mysql -u root -p
-- Create a database
CREATE DATABASE mydb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- Create an application user with strong auth
CREATE USER 'myapp'@'%' IDENTIFIED BY 'strong_password_here';
GRANT SELECT, INSERT, UPDATE, DELETE ON mydb.* TO 'myapp'@'%';
FLUSH PRIVILEGES;

-- Verify
SHOW GRANTS FOR 'myapp'@'%';

mysql CLI Reference

# Connect
mysql -u myapp -p -h 127.0.0.1 mydb

# Execute a single statement
mysql -u myapp -p -e "SELECT COUNT(*) FROM orders;" mydb

# Import a SQL file
mysql -u myapp -p mydb < schema.sql

# Export query results to CSV
mysql -u myapp -p -e "SELECT * FROM users" mydb \
  | tr '\t' ',' > users.csv
-- Inside the mysql shell
SHOW DATABASES;
USE mydb;
SHOW TABLES;
DESCRIBE users;
SHOW CREATE TABLE users\G
SHOW PROCESSLIST;
SHOW ENGINE INNODB STATUS\G

Configuration Tuning

Edit /etc/mysql/mysql.conf.d/mysqld.cnf (or /etc/my.cnf on RHEL).

Read the full file on GitHub · 374 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 374 lines · 24 tokens per session scan D 0f6eeaed9eaf

Subscribe to this mod's changes

mysql is a skill published in the GitHub repository BagelHole/DevOps-Security-Agent-Skills (1,071 stars, last pushed 3mo ago), licensed MIT. It adds 24 tokens to every session and 2,780 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories