A powerful VS Code extension to manage MySQL Server instances using Docker directly from your editor.
- π Start/Stop MySQL Server - Easily manage your MySQL instance with one click
- π¦ Create Databases - Create new databases with custom users and passwords
- πΎ Persistent Data - Your data is saved in a Docker volume and persists between sessions
- βοΈ Configurable - Customize port, password, MySQL version, and data location
- π Live Status - See your server status in the status bar
- π³ Tree View - Manage databases directly from the sidebar
- π Notifications - Get feedback for all actions
- VS Code version 1.85.0 or higher
- Docker version 20.0 or higher
- Open VS Code
- Go to Extensions (Cmd+Shift+X / Ctrl+Shift+X)
- Search for "MySQL VSC Server"
- Click Install
- Look for the database icon (ποΈ) in the Activity Bar (left sidebar)
- Click it to open MySQL Docker Manager
- Click the
βΆοΈ Start Server button - MySQL will be downloaded and started (first time takes a minute)
- Click β Create Database
- Enter:
- Database name
- Database user
- Database password
- Done! Your database is ready
Use any MySQL client:
Host: localhost
Port: 3306
Username: your_user
Password: your_password
Database: your_database
Popular clients:
- DBeaver Community
- MySQL Workbench
- Command line:
mysql -h localhost -u your_user -p
All commands are available in the MySQL Docker Manager sidebar:
| Command | Button | Action |
|---|---|---|
| Start Server | Start MySQL Docker container | |
| Stop Server | βΉοΈ | Stop MySQL Docker container |
| Create Database | β | Create new database with user |
| View Status | βΉοΈ | Show server status and info |
| Configure Settings | βοΈ | Change port, password, version |
Click βοΈ Settings to customize:
- Port - Default: 3306
- Root Password - Default: root
- MySQL Version - Default: latest
- Container Name - Default: vscode-mysql
All your data is automatically saved in a Docker named volume called vscode-mysql-data.
This approach works seamlessly on:
- β Windows (Docker Desktop)
- β macOS (Intel & Apple Silicon)
- β Linux (all distributions)
Why Docker volumes?
- No path issues across different operating systems
- Data is managed by Docker
- No manual directory creation needed
- Works with Docker Desktop and Docker Engine
When you stop the server:
- β Data is preserved
- β Container is paused
- β You can restart anytime
When you start the server again:
- β All previous data is restored
- β Same databases and users are available
- β No data loss!
- Language: TypeScript
- API: VS Code Extension API
- Runtime: Docker
- Database: MySQL
- Build: esbuild
src/
βββ extension.ts # Main extension entry point
βββ commands/
β βββ index.ts # All 5 commands
βββ docker/
β βββ dockerManager.ts # Docker container management
βββ config/
β βββ configManager.ts # Configuration management
βββ ui/
βββ statusBarManager.ts # Status bar component
βββ treeDataProvider.ts # Sidebar tree view
const mysql = require('mysql2/promise');
const connection = await mysql.createConnection({
host: 'localhost',
user: 'your_user',
password: 'your_password',
database: 'your_database'
});import mysql.connector
conn = mysql.connector.connect(
host="localhost",
user="your_user",
password="your_password",
database="your_database"
)$conn = new mysqli(
"localhost",
"your_user",
"your_password",
"your_database"
);Error: docker command not found
Solution: Install Docker from https://www.docker.com/products/docker-desktop
Error: Cannot connect to Docker daemon
Solution: Open Docker Desktop application
Error: Port 3306 already in use
Solution: Change port in Settings (βοΈ)
Check:
- Server status (βΉοΈ View Status)
- Correct host (localhost)
- Correct port (default 3306)
- Correct username and password
If you deleted the container but .vscode-mysql-data folder exists:
- Click
βΆοΈ Start Server - Extension will create new container and restore your data
- Version: 0.1.0
- Size: 61 KB
- Dependencies: 0 (uses Node.js built-ins)
- License: GNU GPL 3.0
- Author: mazylawzey
- Use strong passwords in production environments
- Backup important data regularly
- Check disk space - databases can grow large
- Monitor logs -
docker logs vscode-mysql - Use version control for your database scripts
- MariaDB support
- Database backup/restore
- SQL query editor
- Visual database designer
- PostgreSQL support
- Export/Import databases
- Database snapshots
- Multi-server management
GNU GPL 3.0 Β© 2026 mazylawzey
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
If you encounter any issues:
- Check Troubleshooting section
- Check Docker is installed and running
- Review Docker logs:
docker logs vscode-mysql - Open an issue on GitHub
Made with β€οΈ for developers
If you find this extension helpful, please give it a β on GitHub!