DEV Community

Cover image for 🚀 sqltool: A Lightweight Local MySQL/MariaDB Instance Manager (No Containers Needed)
Luciano Federico Pereira
Luciano Federico Pereira

Posted on

🚀 sqltool: A Lightweight Local MySQL/MariaDB Instance Manager (No Containers Needed)

👉 GitHub repo: sqltool

If you’ve ever spun up a MySQL or MariaDB database for local development, you’ve probably gone through one of these:

Pull a heavy Docker image

Run a container that stays running even when you don’t need it

Install a system‑wide service that auto‑starts on boot

Fight with conflicting ports, configs, or leftover data

For something as simple as “I need a database for this project,” that’s a lot of overhead.

sqltool takes a different approach.

It’s a tiny, single‑file CLI tool that creates isolated MySQL/MariaDB instances on your machine — without containers, without systemd services, and without touching your global database installation.

Each project gets its own clean, isolated environment that runs only when you explicitly start it.

🧩 What is sqltool?

sqltool is a local MySQL/MariaDB instance manager designed specifically for development workflows. It:

Runs mysqld directly as your user

Creates isolated per‑project instances

Avoids global configuration changes

Keeps everything inside ~/sql/

Works on almost any Linux distribution

Requires no dependencies beyond Perl and MariaDB

It’s ideal for developers working on multiple projects, microservices, or experiments where each environment needs its own database.

✨ Key Features

No containers — no Docker, no Podman, no images to pull

No system services — nothing auto‑starts, nothing runs in the background

Isolated instances — each project gets its own data directory, socket, port, and logs

Simple workflow — add, start, stop, backup, restore, clone

Multi‑distro support — Debian, Ubuntu, Fedora, Arch, SUSE, Alpine, Void, and more

Single‑file tool — just copy it and run

📦 Requirements

Perl 5 (preinstalled on almost every Linux distro)

MariaDB or MySQL (auto‑installed if missing)

📚 Commands Overview

Command Description
add Create new instance
remove Delete instance + data
start Start instance
stop Stop instance
list List all instances
info Show details
port Show port
logs Show recent logs
backup Create SQL backup
restore Restore backup
clone Clone instance
status Quick status
help Show help

🐧 Supported Linux Distributions

Auto‑detection + auto‑installation works on:

Debian, Ubuntu, Linux Mint, Pop!_OS, elementary OS
Fedora, RHEL, CentOS, Rocky, AlmaLinux
Arch Linux, Manjaro
openSUSE, SUSE
Alpine Linux
Void Linux

For other distros, just install MariaDB manually.

🐪 Why Perl?

Because for this kind of tool, Perl hits the sweet spot:
Preinstalled everywhere
No dependency hell
Uses only core modules
Fast startup
Perfect for system tasks
Single‑file distribution
Stable across decades

Many classic Linux tools are still written in Perl or shell for a reason — they’re reliable, portable, and easy to maintain.

📜 License

LGPL‑2.1 — see source file for details.

👤 Author

Luciano Federico Pereira

Top comments (0)