MySQL VSC Server 🗄️
A powerful VS Code extension to manage MySQL Server instances using Docker directly from your editor.

✨ Features
- 🚀 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
📋 Requirements
- VS Code version 1.85.0 or higher
- Docker version 20.0 or higher
🚀 Quick Start
1. Install the Extension
- Open VS Code
- Go to Extensions (Cmd+Shift+X / Ctrl+Shift+X)
- Search for "MySQL VSC Server"
- Click Install
2. Open MySQL Docker Manager
- Look for the database icon (🗄️) in the Activity Bar (left sidebar)
- Click it to open MySQL Docker Manager
3. Start Your Server
- Click the ▶️ Start Server button
- MySQL will be downloaded and started (first time takes a minute)
4. Create a Database
- Click ➕ Create Database
- Enter:
- Database name
- Database user
- Database password
- Done! Your database is ready
5. Connect to Your Database
Use any MySQL client:
Host: localhost
Port: 3306
Username: your_user
Password: your_password
Database: your_database
Popular clients:
🎯 Commands
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 |
⚙️ Configuration
Click ⚙️ Settings to customize:
- Port - Default: 3306
- Root Password - Default: root
- MySQL Version - Default: latest
- Container Name - Default: vscode-mysql
💾 Data Persistence
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!
🛠️ Technology Stack
- Language: TypeScript
- API: VS Code Extension API
- Runtime: Docker
- Database: MySQL
- Build: esbuild
📦 What's Inside
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
🎓 Examples
Node.js Connection
const mysql = require('mysql2/promise');
const connection = await mysql.createConnection({
host: 'localhost',
user: 'your_user',
password: 'your_password',
database: 'your_database'
});
Python Connection
import mysql.connector
conn = mysql.connector.connect(
host="localhost",
user="your_user",
password="your_password",
database="your_database"
)
PHP Connection
$conn = new mysqli(
"localhost",
"your_user",
"your_password",
"your_database"
);
🐛 Troubleshooting
Docker not found
Error: docker command not found
Solution: Install Docker from https://www.docker.com/products/docker-desktop
Docker daemon not running
Error: Cannot connect to Docker daemon
Solution: Open Docker Desktop application
Port already in use
Error: Port 3306 already in use
Solution: Change port in Settings (⚙️)
Can't connect to database
Check:
- Server status (ℹ️ View Status)
- Correct host (localhost)
- Correct port (default 3306)
- Correct username and password
Data loss
If you deleted the container but .vscode-mysql-data folder exists:
- Click ▶️ Start Server
- Extension will create new container and restore your data
📊 Stats
- Version: 0.1.0
- Size: 61 KB
- Dependencies: 0 (uses Node.js built-ins)
- License: MIT
- Author: mazylawzey
🔗 Links
💡 Tips
- 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
🚀 Future Features
- [ ] MariaDB support
- [ ] Database backup/restore
- [ ] SQL query editor
- [ ] Visual database designer
- [ ] PostgreSQL support
- [ ] Export/Import databases
- [ ] Database snapshots
- [ ] Multi-server management
📝 License
MIT © 2026 mazylawzey
🤝 Contributing
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
❓ Support
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
Quick Links
If you find this extension helpful, please give it a ⭐ on GitHub!