$npx -y skills add adityahimaone/hermes-agent-rtk-caveman --skill mysql-service-managerManages MySQL services via Homebrew with RTK integration for token optimization. Provides easy start/stop/restart/status commands and monitoring capabilities.
| 1 | # MySQL Service Manager Skill |
| 2 | |
| 3 | Manages MySQL services via Homebrew with RTK integration for token optimization. Provides easy start/stop/restart/status commands and monitoring capabilities. |
| 4 | |
| 5 | ## When to Use |
| 6 | Use this skill when you need to: |
| 7 | - Start, stop, or restart MySQL@8.4 service via Homebrew |
| 8 | - Check service status and logs |
| 9 | - Set up monitoring for MySQL service |
| 10 | - Create easy-to-remember aliases for common MySQL operations |
| 11 | |
| 12 | ## Prerequisites |
| 13 | - Homebrew installed (`which brew` returns a path) |
| 14 | - MySQL@8.4 formula installed (`brew list | grep mysql@8.4`) |
| 15 | - RTK (Rust Token Killer) installed for token optimization |
| 16 | |
| 17 | ## Commands |
| 18 | |
| 19 | ### Start MySQL Service |
| 20 | ```bash |
| 21 | rtk brew services start mysql@8.4 |
| 22 | ``` |
| 23 | |
| 24 | ### Stop MySQL Service |
| 25 | ```bash |
| 26 | rtk brew services stop mysql@8.4 |
| 27 | ``` |
| 28 | |
| 29 | ### Restart MySQL Service |
| 30 | ```bash |
| 31 | rtk brew services restart mysql@8.4 |
| 32 | ``` |
| 33 | |
| 34 | ### Check Service Status |
| 35 | ```bash |
| 36 | rtk brew services list | grep mysql@8.4 |
| 37 | ``` |
| 38 | |
| 39 | ### View MySQL Service Logs |
| 40 | ```bash |
| 41 | rtk brew services info mysql@8.4 |
| 42 | ``` |
| 43 | |
| 44 | ### Easy Alias Commands (Add to shell profile) |
| 45 | Add these to your `~/.zshrc` or `~/.bash_profile`: |
| 46 | ```bash |
| 47 | # MySQL shortcuts with RTK |
| 48 | alias mysql-start='rtk brew services start mysql@8.4' |
| 49 | alias mysql-stop='rtk brew services stop mysql@8.4' |
| 50 | alias mysql-restart='rtk brew services restart mysql@8.4' |
| 51 | alias mysql-status='rtk brew services list | grep mysql@8.4' |
| 52 | alias mysql-info='rtk brew services info mysql@8.4' |
| 53 | ``` |
| 54 | |
| 55 | ## Monitoring & Health Checks |
| 56 | |
| 57 | ### Basic Connection Test |
| 58 | ```bash |
| 59 | rtk mysqladmin -u root ping |
| 60 | ``` |
| 61 | |
| 62 | ### Service Uptime Check |
| 63 | ```bash |
| 64 | rtk mysqladmin -u root version |
| 65 | ``` |
| 66 | |
| 67 | ### Process List |
| 68 | ```bash |
| 69 | rtk mysqladmin -u root processlist |
| 70 | ``` |
| 71 | |
| 72 | ## Troubleshooting |
| 73 | |
| 74 | ### If Service Fails to Start |
| 75 | 1. Check logs: `rtk brew services info mysql@8.4` |
| 76 | 2. Check configuration: `rtk cat $(brew --prefix)/etc/my.cnf` |
| 77 | 3. Check for port conflicts: `rtk lsof -i :3306` |
| 78 | 4. Repair database: `rtk mysqlcheck -u root --all-databases --auto-repair` |
| 79 | |
| 80 | ### Common Issues |
| 81 | - **Port already in use**: Another service is using port 3306 |
| 82 | - **Permission issues**: Data directory permissions incorrect |
| 83 | - **Corrupted tables**: Run mysqlcheck or restore from backup |
| 84 | |
| 85 | ## Verification Steps |
| 86 | After running any command, verify success by: |
| 87 | 1. Checking service status shows "started" |
| 88 | 2. Testing connection with `rtk mysqladmin ping` |
| 89 | 3. Verifying no error messages in output |
| 90 | |
| 91 | ## Examples |
| 92 | ```bash |
| 93 | # Start MySQL service |
| 94 | mysql-start |
| 95 | |
| 96 | # Check if it's running |
| 97 | mysql-status |
| 98 | |
| 99 | # View detailed info |
| 100 | mysql-info |
| 101 | |
| 102 | # Restart after configuration change |
| 103 | mysql-restart |
| 104 | ``` |