MySQL VSC Server
Manage multiple databases directly from VS Code using Docker!

✨ Features
🎯 Core
- ✅ 12+ Databases — MySQL, PostgreSQL, MongoDB, Redis, Oracle, MSSQL, SQLite, CockroachDB, Neo4j, Cassandra, Elasticsearch and more
- 🔄 Instant Switching — Switch between different database types effortlessly
- 🐳 Full Docker Support — No dependencies required on your machine
- 💾 Data Persistence — Your data is stored in Docker volumes and persists between sessions
🚀 Server Management
- ⏯️ Start/Stop — One-click control over your servers
- 🗑️ Remove — Completely clean up containers and volumes
- 🔌 Custom Ports — Choose any available port
- 🎯 Versioning — Run any version of your database
- 🔐 Security — Set passwords for access control
📊 Monitoring
- 📈 Real-time Status — Monitor your server state in the status bar
- 🌳 Tree View Interface — Convenient hierarchical structure
- ⚡ Performance — View CPU and memory usage
- 🔔 Notifications — Always stay informed
🔍 Extensibility
- 🌐 Docker Hub Search — Search and use any Docker images
- ⚙️ Full Configuration — Customize everything to your needs
- 📦 Multi-Database — Manage multiple databases simultaneously
- 🎨 Beautiful UI — Emoji icons and intuitive navigation
📋 Requirements
Prerequisites
- VS Code version 1.85.0 or higher
- Docker version 20.0 or higher
Docker Installation
Verify installation:
docker --version
docker run hello-world
🚀 Installation
Method 1: VS Code Marketplace (Recommended)
- Open VS Code
- Press
Cmd+Shift+X (macOS) or Ctrl+Shift+X (Windows/Linux)
- Search for "MySQL VSC Server"
- Click Install
Method 2: Command Line
code --install-extension mazylawzey.database-server
Method 3: From Source
git clone https://github.com/MazyLawzey/mysql-vsc-server
cd mysql-vsc-server
npm install
npm run esbuild
# Open as extension in VS Code
📖 Usage
1️⃣ Open the Control Panel
Click the 🔒 icon in the Activity Bar (left sidebar)
2️⃣ Choose a Database
- Click on the database type you want to use
- Or use the command
Database: Switch Engine
3️⃣ Start the Server
- Click ▶️ Start Server
- Or use the command
Database: Start Server
- First run may take a minute (Docker image download)
4️⃣ Manage Databases
Create DB: Database: Create Database
Stop Server: Database: Stop Server
Remove Server: Database: Remove Server
View Status: Database: View Status
Settings: Database: Configure Settings
Search Docker: Database: Search Docker Images
5️⃣ Connect in Your Code
Connect to your database using standard parameters:
MySQL/PostgreSQL/Oracle/MSSQL/CockroachDB:
Host: localhost
Port: 3306 (MySQL) or 5432 (PostgreSQL) — see status
User: root (default)
Password: your_password
MongoDB/Redis/Cassandra:
Host: localhost
Port: 27017 (MongoDB) or 6379 (Redis) — see status
Connection Examples:
// Node.js + MySQL
const mysql = require('mysql2/promise');
const connection = await mysql.createConnection({
host: 'localhost',
user: 'root',
password: 'your_password',
database: 'mydb'
});
# Python + PostgreSQL
import psycopg2
conn = psycopg2.connect(
host="localhost",
user="postgres",
password="your_password",
database="mydb"
)
// Node.js + MongoDB
const MongoClient = require('mongodb').MongoClient;
const client = new MongoClient('mongodb://localhost:27017');
🗄️ Supported Databases
🔵 Relational Databases (7)
| Database |
Emoji |
Port |
Image |
| MySQL |
🐬 |
3306 |
mysql:latest |
| PostgreSQL |
🐘 |
5432 |
postgres:latest |
| MariaDB |
🌊 |
3307 |
mariadb:latest |
| Oracle Database |
🔴 |
1521 |
oracle/database:latest |
| Microsoft SQL Server |
🔵 |
1433 |
mcr.microsoft.com/mssql/server |
| SQLite |
📄 |
N/A |
Built-in support |
| CockroachDB |
🪳 |
26257 |
cockroachdb/cockroach:latest |
📊 NoSQL Databases (3)
| Database |
Emoji |
Port |
Image |
| MongoDB |
🍃 |
27017 |
mongo:latest |
| Cassandra |
⚡ |
9042 |
cassandra:latest |
| Neo4j |
🕸️ |
7687 |
neo4j:latest |
💾 Other Systems (2)
| System |
Emoji |
Port |
Image |
| Redis |
🔍 |
6379 |
redis:latest |
| Elasticsearch |
📦 |
9200 |
docker.elastic.co/elasticsearch/elasticsearch:latest |
🌐 Custom Images
Search and use any Docker image:
- Click 🔍 Search Docker Images
- Enter the name (e.g.,
postgres, mongodb, rabbitmq)
- Select desired image from the list
- Configure port and container name
- Done! 🚀
🎮 Commands
| Command |
Shortcut |
Description |
Database: Start Server |
— |
Start the database |
Database: Stop Server |
— |
Stop the database |
Database: Remove Server |
— |
Remove the database |
Database: Switch Engine |
— |
Switch database type |
Database: Create Database |
— |
Create new database |
Database: View Status |
— |
Show status |
Database: Configure Settings |
— |
Open settings |
Database: Search Docker Images |
— |
Search Docker images |
⚙️ Configuration
The configuration file is automatically created at:
~/.config/Code/User/globalStorage/mazylawzey.database-server/
Example Configuration:
{
"currentEngine": "mysql",
"containers": {
"mysql": {
"port": 3306,
"password": "your_password",
"version": "latest",
"containerName": "mysql-vsc"
},
"postgresql": {
"port": 5432,
"password": "your_password",
"version": "latest",
"containerName": "postgres-vsc"
}
},
"databases": {
"mysql": [],
"postgresql": []
}
}
Customization:
- Open the command
Database: Configure Settings
- Edit the parameters:
- 🔌 Port
- 🔐 Password
- 📦 Database version
- 🏷️ Container name
🖼️ Screenshots
Control Panel
🗄️ Database Manager
├── 🐬 MySQL (🟢 Running)
│ ├── 📊 Status: Running on port 3306
│ ├── 💾 Databases
│ │ ├── database1
│ │ ├── database2
│ │ └── myapp_db
│ ├── ⚡ Performance: CPU 2%, RAM 256MB
│ └── 🎯 Actions
│ ├── ⏸️ Stop
│ ├── ➕ Create DB
│ └── ⚙️ Settings
│
├── 🐘 PostgreSQL (🔴 Stopped)
│ ├── 📊 Status: Stopped
│ └── 🎯 Actions
│ ├── ▶️ Start
│ └── ⚙️ Settings
│
└── 🍃 MongoDB (🟢 Running)
├── 📊 Status: Running on port 27017
└── 🎯 Actions
├── ⏸️ Stop
└── ⚙️ Settings
🐛 Troubleshooting
❌ "Docker not found"
# Install Docker Desktop
# https://www.docker.com/products/docker-desktop
# Or verify Docker is running
docker ps
❌ "Connection refused"
# Ensure the server is running
# Check the correct port in settings
# Restart VS Code
❌ "Insufficient permissions"
# Grant Docker permissions (Linux)
sudo usermod -aG docker $USER
newgrp docker
❌ "Port already in use"
# Find process on port
lsof -i :3306 # or another port
# Change port in extension settings
🤝 Contributing
Pull requests are welcome! For major changes:
- Open an Issue for discussion
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature)
- Commit your changes (
git commit -m 'Add AmazingFeature')
- Push to the branch (
git push origin feature/AmazingFeature)
- Open a Pull Request
📝 License
GNU General Public License v3.0 — see LICENSE file
👨💻 Author
Mazylawzey — GitHub | Email
Made with ❤️ for the developer community
🙏 Acknowledgments
- Docker for containerization
- VS Code for the awesome editor
- All contributors and users
📞 Support