MySQL Manager

Manage a shared MySQL Docker container for local dev environments. Handles container lifecycle, database creation/removal, and cross-instance data dumps. Designed to work alongside proxy-manager and worktree-manager.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "MySQL Manager" with this command: npx skills add pereirajair/mysql-manager

MySQL Manager

Manages the shared MySQL Docker container used by local dev instances.

Architecture

mysql-manager/
├── docker-compose.yml   # MySQL 8.0 container
└── run.sh               # lifecycle + db admin CLI

The MySQL container runs on the shared Docker network (nginx-proxy_net by default), making it accessible to all app containers by hostname (codai_db). Data is persisted in a named volume (mysql_data).

Commands

./run.sh start                    # start MySQL container
./run.sh stop                     # stop container (data persists in volume)
./run.sh status                   # container status + list databases
./run.sh wait                     # block until MySQL is ready (for scripts)
./run.sh create-db <name>         # CREATE DATABASE IF NOT EXISTS
./run.sh drop-db <name>           # DROP DATABASE (interactive confirm)
./run.sh dump <src> <dest>        # mysqldump src | mysql dest
./run.sh list-dbs                 # SHOW DATABASES (filtered)

How to Execute Tasks

Start MySQL for the first time

cd mysql-manager && ./run.sh start

On first run, Docker creates the volume and initializes codai_main.

Create a database for a new instance

./run.sh create-db codai_alpha

Snapshot main database into a new instance

./run.sh dump codai_main codai_alpha

Remove a worktree database

./run.sh drop-db codai_alpha   # prompts for confirmation

Check status

./run.sh status

Startup Order

Start MySQL before starting any app instances:

  1. proxy-manager: ./run.sh start (creates the shared Docker network)
  2. mysql-manager: ./run.sh start (joins the shared network)
  3. worktree-manager: ./run.sh start <instance>

Configuration

Set via environment variables or a .env file in mysql-manager/:

VariableDefaultPurpose
MYSQL_CONTAINERcodai_dbContainer name
MYSQL_ROOT_PASSsecretMySQL root password
MYSQL_MAIN_DBcodai_mainPrimary database name
MYSQL_PORT3307Host port (maps to 3306)
CODAI_NETWORKnginx-proxy_netShared Docker network name

Rules

  • Never drop MYSQL_MAIN_DB — it is the source of truth for snapshots.
  • The drop-db command always prompts for confirmation.
  • stop preserves data in the Docker volume. Use docker compose down -v only to wipe data intentionally.
  • The container name (codai_db) is the hostname used by backend apps to connect.

Related Plugins

  • proxy-manager — manages the nginx-proxy that routes traffic to app instances (start this first)
  • worktree-manager — manages app instances and git worktrees (depends on this plugin)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

儿童危险行为识别分析工具

Detects climbing, playing with fire, touching power sources, and dangerous actions near windows, providing real-time alerts. It is suitable for child safety...

Registry SourceRecently Updated
Coding

Skill Oracle

Skill Oracle — Curated documentation of quality ClawHub skills. Markdown tables telling agents which tools work and which are empty. Not an API or code library.

Registry SourceRecently Updated
Coding

Suspicious Message Safety Check

Calmly analyze suspicious messages for risk signals without clicking links or sharing sensitive data, and guide safe verification steps while avoiding certai...

Registry SourceRecently Updated
Coding

Postgres Manager

Manage a shared PostgreSQL Docker container for local dev environments. Handles container lifecycle, database creation/removal, and cross-instance dumps via...

Registry SourceRecently Updated