HeadlinesBriefing favicon HeadlinesBriefing.com

sqltool: A Lightweight Local MySQL Manager Without Containers

DEV Community •
×

Developers often struggle with heavy Docker images or system-wide services for local MySQL databases. sqltool offers a single-file CLI alternative that creates isolated instances without containers or background services. It runs mysqld directly as your user, keeping each project's data in a separate ~/sql/ directory. This avoids port conflicts and leftover data between projects.

The tool supports major Linux distributions, auto-detecting and installing MariaDB if missing. It requires only Perl 5, which is preinstalled on most systems. Commands like `add`, `start`, `stop`, `backup`, and `clone` manage per-project environments. This approach is ideal for developers juggling multiple microservices or experiments needing clean, temporary databases.

Luciano Federico Pereira built sqltool to be portable and reliable, leveraging Perl's stability for system tasks. Licensed under LGPL-2.1, it's a practical tool for reducing local development overhead. As containerization grows more complex, such lightweight alternatives gain traction for focused, isolated workflows.