agentleFS
liushikuan63liushikuan63/Qoder-Optimization/skills/mysql/SKILL.md

mysql

Skill2 starsChanged 11 days agoMITView on GitHub

MySQL relational database with InnoDB, replication, and stored procedures. Use for MySQL operations.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use redis and docker.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Sorcha-PlatformSkill

    redis

    Implements Redis caching, session management, and distributed coordination for the Sorcha platform. Use when: Adding caching layers, token revocation, rate limiting, SignalR backplane, or distributed state.

    Also in 3 projects that use this

  • wrsmith108Skill

    docker

    Container-based development for isolated, reproducible environments. Use when running npm commands, installing packages, executing code, or managing project dependencies. Trigger phrases include "npm install", "run the build", "start the server", "install package", or any code execution request.

    Also in 3 projects that use this

The file

Files
SKILL.md

MySQL

MySQL is a widely used relational database management system (RDBMS). It is the "M" in the LAMP stack and powers huge platforms like Facebook and WordPress.

When to Use

  • Web Applications: Standard for PHP/Laravel/Wordpress ecosystems.
  • Read-Heavy Workloads: Historically very fast for simple read operations.
  • Replication: Huge ecosystem of tools for Master-Slave replication and clustering (Galera, InnoDB Cluster).

Quick Start

-- Upsert (Insert or Update)
INSERT INTO users (id, name) VALUES (1, 'Jane')
ON DUPLICATE KEY UPDATE name = 'Jane';

Core Concepts

Storage Engines

  • InnoDB: The default. Supports transactions (ACID), row-level locking, and foreign keys. Always use this.
  • MyISAM: Legacy. Fast reads but table-level locking and no transactions. Avoid.

Explain

Prefix any query with EXPLAIN to see how MySQL executes it (indexes used, rows scanned).

EXPLAIN SELECT * FROM users WHERE email = 'test@test.com';

Replication

MySQL replication is often asynchronous by default, meaning slaves might lag behind master.

Best Practices (2025)

Do:

  • Use MySQL 8.4+: For LTS features like EXPLAIN ANALYZE and CTE support.
  • Use utf8mb4: The real UTF-8. The standard utf8 in MySQL is a partial implementation (max 3 bytes).
  • Disable mysql_native_password: In 8.4+, use caching_sha2_password for security.

Don't:

  • Don't use MyISAM: It is effectively obsolete for modern apps.
  • Don't store logic in Stored Procedures: Hard to version control and debug. Keep logic in the app layer.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.