An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# ClusterDuck πŸ₯
*A Modern GUI for Managing MySQL InnoDB Clusters*

![ClusterDuck Logo](img/overview2.png)

**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 |
|--------------|------------------|------------------|
| ![Login](img/login.png) | ![Overview](img/overview.png) | ![Node View](img/node-detail.png) |

---

## πŸ“ 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