https://github.com/wsmaxcy/clusterduck
MySQL InnoDB-Cluster GUI Manager
https://github.com/wsmaxcy/clusterduck
cluster-api clustering gui gui-application innodb innodb-cluster mysql mysql-connector mysql-database mysql-gui mysql-gui-client
Last synced: 4 months ago
JSON representation
MySQL InnoDB-Cluster GUI Manager
- Host: GitHub
- URL: https://github.com/wsmaxcy/clusterduck
- Owner: wsmaxcy
- Created: 2025-06-22T09:22:40.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-22T09:37:32.000Z (5 months ago)
- Last Synced: 2025-06-22T10:28:53.923Z (5 months ago)
- Topics: cluster-api, clustering, gui, gui-application, innodb, innodb-cluster, mysql, mysql-connector, mysql-database, mysql-gui, mysql-gui-client
- Language: Python
- Homepage:
- Size: 165 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ClusterDuck π₯
*A Modern GUI for Managing MySQL InnoDB Clusters*

**ClusterDuck** is a modern, dark-themed GUI built with Python and `customtkinter` to manage and monitor [MySQL InnoDB Clusters](https://dev.mysql.com/doc/mysql-shell/8.0/en/). Featuring real-time LED indicators, a tabbed multi-node interface, safe command presets, and portable `.exe` support β itβs the friendliest duck in your database pond.
---
## π Features
- β
Sleek **dark-mode GUI** using `customtkinter`
- β
Real-time **LED indicators** (green/yellow/red/blue) for node status
- β
**Tabbed layout** for simultaneous multi-node management
- β
**Preloaded MySQL Shell commands** (JS + SQL) with color-coded safety levels
- β
**Custom JS/SQL input** field with live output display
- β
**Safe subprocess handling** (no flashing terminals)
- β
**Fully portable `.exe`** (no installer needed)
---
## π§° Preinstalled Commands
ClusterDuck includes a wide range of prebuilt administrative and diagnostic commands, color-coded and organized by risk level:
### π΅ Safe JS Commands
- β
Check Cluster Status
`dba.getCluster().status({ extended: true })`
- β
List Cluster Instances
`dba.getCluster().describe()`
- β
Rescan Topology
`dba.getCluster().rescan()`
- β
Check Instance Health
`dba.checkInstanceConfiguration('@')`
- β
Check Global Config
`dba.checkInstanceConfiguration()`
### π’ Safe SQL Commands
- β
Show Hostname and Port
`SELECT @@hostname, @@port;`
- β
Show Cluster Members
`SELECT * FROM performance_schema.replication_group_members;`
- β
Show Replication Applier Status
`SELECT * FROM performance_schema.replication_applier_status;`
- β
Show Replication Connection Status
`SELECT * FROM performance_schema.replication_connection_status;`
- β
Check GTID Mode
`SELECT @@gtid_mode;`
- β
Check Binary Log Format
`SELECT @@global.binlog_format;`
- β
Check SSL Settings
`SHOW VARIABLES LIKE '%ssl_mode%';`
- β
MySQL Version
`SELECT VERSION();`
- β
Set Read-Only Mode
`SET GLOBAL super_read_only = ON; SET GLOBAL read_only = ON;`
- β
Set Read-Write Mode
`SET GLOBAL super_read_only = OFF; SET GLOBAL read_only = OFF;`
- β
Start Group Replication
`START GROUP_REPLICATION;`
### β οΈ Dangerous JS Commands (Yellow)
- β οΈ Set Primary Instance
`dba.getCluster().setPrimaryInstance('')`
- β οΈ Rejoin Instance
`dba.getCluster().rejoinInstance('')`
- β οΈ Force Rejoin
`dba.getCluster().rejoinInstance('', {force: true})`
- β οΈ Reboot from Outage
`dba.rebootClusterFromCompleteOutage()`
- β οΈ Add Instance (Clone)
`dba.getCluster().addInstance('@', {recoveryMethod: 'clone'})`
- β οΈ Remove Instance
`dba.getCluster().removeInstance('@')`
### π₯ Dangerous SQL Commands (Red)
- β οΈ Stop Group Replication
`STOP GROUP_REPLICATION;`
> Dangerous commands are clearly marked in red or yellow with warning icons and hover tooltips in the UI.
---
## πΈ Screenshots
> Add screenshots in the `img/screenshots/` folder and update the links below.
| Login Dialog | Cluster Overview | Node Detail View |
|--------------|------------------|------------------|
|  |  |  |
---
## π Project Structure
InnoDB-Manager/
βββ img/
β βββ icon.png
β βββ icon.ico
β βββ greenLED.png
β βββ yellowLED.png
β βββ redLED.png
β βββ blueLED.png
β βββ screenshots/
β βββ login.png
β βββ overview.png
β βββ node-detail.png
βββ tabbed.py
βββ README.md
βββ LICENSE
βββ dist/
βββ ClusterDuck.exe
---
## π§ Requirements
- **Python 3.9+** (tested on Python 3.12)
- [`mysqlsh`](https://dev.mysql.com/downloads/shell/) must be installed and available in your system `PATH`
- **Windows 10/11** recommended (but Linux support possible with modification)
- Install required libraries:
```bash
pip install customtkinter pillow psutil
---
## βΆοΈ Running from Source
```python
python ClusterDuck.py
```
---
## π¦ Build a Standalone .exe
To create a fully portable executable using PyInstaller:
```bash
pyinstaller --noconfirm --onefile --windowed --icon "img/icon.ico" --add-data "img;img/" tabbed.py
```
---
## π Known Issues
Requires mysqlsh in the system PATH
Designed/tested against MySQL InnoDB Cluster 8.x with GTID enabled
GUI assumes a fully functioning cluster topology with reachable nodes
---
## π License
MIT License
---
## π¬ Feedback & Contributions
Spotted a bug? Have a feature request?
Open an issue or contribute at:
π github.com/wsmaxcy/ClusterDuck