MySQL Service Control is a small Tauri desktop app for Linux that lets you start, stop, restart, enable, disable, and inspect the mysqld service from a simple UI.
This project is intentionally narrow. It is not a SQL client, it does not manage database users, and it does not send SQL queries to MySQL. It only controls the Linux service.
Release builds are published in three Linux-friendly formats:
AppImagefor broad Linux compatibilityDEBfor Debian and Ubuntu based distributionsRPMfor Fedora and other RPM based distributions
- Check the current
mysqldstatus - Start the service
- Stop the service
- Restart the service
- Enable the service to start at boot
- Disable the service from starting at boot
- Refresh the service state at any time
- Show command output and setup-related errors in the UI
- Make sure your machine uses Linux with
systemd. - Confirm the MySQL service name is
mysqld. - Add a restricted
sudoersrule forsystemctl start|stop|restart|enable|disable mysqld. - Validate the commands in the terminal.
- Run the Tauri app.
- Linux with
systemd - A
mysqldsystemd unit available on the machine sudoinstalled- A user account allowed to run the required
systemctlcommands without an interactive password prompt - Node.js, Yarn, and Rust tooling for local development
Create a dedicated sudoers rule that only allows the required commands.
Run visudo and add a rule like this, replacing youruser with your Linux username:
youruser ALL=(root) NOPASSWD: /usr/bin/systemctl start mysqld, /usr/bin/systemctl stop mysqld, /usr/bin/systemctl restart mysqld, /usr/bin/systemctl enable mysqld, /usr/bin/systemctl disable mysqld
On some distributions, systemctl may live in a different path. Check it with:
which systemctlAfter that, validate the rule before using the app:
sudo -n systemctl start mysqld
sudo -n systemctl stop mysqld
sudo -n systemctl restart mysqld
sudo -n systemctl enable mysqld
sudo -n systemctl disable mysqldIf those commands still ask for a password or fail with a sudo policy error, the app will not be able to perform service actions.
The Tauri backend runs a fixed set of Linux commands and sends the result back to the React frontend.
The current commands are:
systemctl is-active mysqldsystemctl is-enabled mysqldsudo -n systemctl start mysqldsudo -n systemctl stop mysqldsudo -n systemctl restart mysqldsudo -n systemctl enable mysqldsudo -n systemctl disable mysqld
The -n flag keeps sudo non-interactive so the desktop app does not block on a password prompt.
The app does not execute arbitrary shell commands.
It only calls a fixed set of systemctl operations for mysqld. This keeps the scope intentionally narrow and easier to audit in an open-source setting.
Install dependencies:
yarn installRun the frontend in development mode:
yarn devRun the Tauri desktop app:
yarn tauri devBuild the frontend:
yarn buildCheck the Rust backend:
cd src-tauri
cargo checkUse docs/manual-testing.md as the release checklist for Linux verification, sudoers validation, and screenshot capture.
The repository includes a basic GitHub Actions workflow that runs:
yarn buildcargo check
On Linux CI runners, the workflow installs the native GTK/GLib development packages required by Tauri before running cargo check.
Your sudoers rule is missing, too broad, too narrow, or using the wrong systemctl path.
Check:
- the output of
which systemctl - the exact username in the sudoers entry
- whether
sudo -n systemctl restart mysqldworks in the terminal
Your distribution may use a different unit name such as mysql.
Check available units with:
systemctl list-units --type=service | grep -E 'mysql|mysqld'If your machine uses a different unit name, update the SERVICE_NAME constant in src-tauri/src/main.rs before building.
This app is only intended for systemd-based Linux environments.
If the machine does not use systemd, service control will not work.
If the AppImage starts with errors such as EGL_BAD_PARAMETER, GTK parsing warnings, or WebKit process startup issues, prefer the native RPM package instead of the AppImage on Fedora.
The release workflow publishes an .rpm package specifically for Fedora and other RPM-based distributions, and that package is the recommended install path there.
This usually means:
systemctl is-active mysqldworks without privilege- but
sudo -n systemctl start|stop|restart mysqldis not allowed yet
Re-check your sudoers configuration and validate the exact commands manually in the terminal.
If CI fails with errors about glib-2.0, gobject-2.0, or gio-2.0, the Linux runner is missing the native development libraries that Tauri needs.
The repository workflow installs these dependencies before running cargo check. If you create a custom workflow, make sure you install the same Linux packages there as well.
- Linux only
- systemd only
- Default target service is
mysqld - No runtime configuration for alternate unit names yet
- Requires passwordless sudo for service-changing actions
- AppImage may behave differently across Linux graphics stacks; RPM is recommended on Fedora when available
MIT
