database-admin · git:20261114.61d7231 · 2026-11-14 · sha256 4753f97db02e8465

database-admin git:20261114.61d7231A

Immutable. This exact content never changes and is served at /api/v1/blob/4753f97db02e8465.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_stjlg52o4vqkz7ly/4753f97db02e846569f9a3206e623c8414a793c46eb7205a6be22175f25893be.json

Then /plugin install database-admin@markdownregistry-stjlg52o4vqkz7ly in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: database-admin
description: Database operations including SQL query execution, backup/restore, schema management, and performance optimization. Use when running SQL queries, managing database schemas, performing backups, or optimizing query performance. Supports MySQL, PostgreSQL, and other databases.
---

# Database Admin

Database operations and management.

## Quick Start

```json
{
  "type": "execute",
  "command": "mysql",
  "args": ["-u", "root", "-p", "-e", "SHOW DATABASES;"]
}
```

## MySQL Operations

### Connect to Database
```bash
mysql -u username -p database_name
```

### Show Tables
```sql
SHOW TABLES;
```

### Describe Table
```sql
DESCRIBE table_name;
```

### Run Query
```json
{
  "type": "execute",
  "command": "mysql",
  "args": ["-u", "root", "-p", "mydb", "-e", "SELECT * FROM users LIMIT 10;"]
}
```

## Backup and Restore

### Export Database
```json
{
  "type": "execute",
  "command": "mysqldump",
  "args": ["-u", "root", "-p", "mydb", ">", "backup.sql"]
}
```

### Import Database
```json
{
  "type": "execute",
  "command": "mysql",
  "args": ["-u", "root", "-p", "mydb", "<", "backup.sql"]
}
```

## Schema Operations

### Create Table
```sql
CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100),
    email VARCHAR(100)
);
```

### Add Column
```sql
ALTER TABLE users ADD COLUMN created_at TIMESTAMP;
```

### Create Index
```sql
CREATE INDEX idx_email ON users(email);
```

## Performance

### Show Process List
```sql
SHOW PROCESSLIST;
```

### Explain Query
```sql
EXPLAIN SELECT * FROM users WHERE email = 'test@example.com';
```

### Show Indexes
```sql
SHOW INDEX FROM users;
```

## Common Issues

- **Connection refused**: Check MySQL service is running
- **Access denied**: Verify username and password
- **Table not found**: Check database is selected