Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>Database Server ManagerNew to Visual Studio Code? Get it now.
Database Server Manager

Database Server Manager

Mazy Lawzey

|
1 install
| (1) | Free
Manage multiple database servers (MySQL, PostgreSQL, MongoDB, Redis, Oracle, and more) using Docker directly from VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
Frame 9

Database Server Manager

Manage multiple databases directly from VS Code using Docker!

VS Code Extension Version License GitHub

Features • Installation • Usage • Supported DBs


✨ 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

Platform Link
🍎 macOS Docker Desktop
🪟 Windows Docker Desktop
🐧 Linux Docker Engine

Verify installation:

docker --version
docker run hello-world

🚀 Installation

Method 1: VS Code Marketplace (Recommended)

  1. Open VS Code
  2. Press Cmd+Shift+X (macOS) or Ctrl+Shift+X (Windows/Linux)
  3. Search for "Database Server Manager"
  4. 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:

  1. Click 🔍 Search Docker Images
  2. Enter the name (e.g., postgres, mongodb, rabbitmq)
  3. Select desired image from the list
  4. Configure port and container name
  5. 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:

  1. Open the command Database: Configure Settings
  2. 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:

  1. Open an Issue for discussion
  2. Fork the repository
  3. Create a feature branch (git checkout -b feature/AmazingFeature)
  4. Commit your changes (git commit -m 'Add AmazingFeature')
  5. Push to the branch (git push origin feature/AmazingFeature)
  6. 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

  • 🐛 Report a bug: GitHub Issues
  • 💡 Request a feature: GitHub Discussions
  • 💬 Questions: GitHub Discussions

⭐ Like the extension? Give it a star on GitHub!

Made with 🚀 by Mazylawzey

- 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:

  • DBeaver Community
  • MySQL Workbench
  • Command line: mysql -h localhost -u your_user -p

🎯 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:

  1. Server status (ℹ️ View Status)
  2. Correct host (localhost)
  3. Correct port (default 3306)
  4. Correct username and password

Data loss

If you deleted the container but .vscode-mysql-data folder exists:

  1. Click ▶️ Start Server
  2. 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: GNU GPL 3.0
  • Author: mazylawzey

🔗 Links

  • GitHub Repository
  • VS Code Extension
  • Docker Documentation
  • MySQL Documentation

💡 Tips

  1. Use strong passwords in production environments
  2. Backup important data regularly
  3. Check disk space - databases can grow large
  4. Monitor logs - docker logs vscode-mysql
  5. 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

GNU GPL 3.0 © 2026 mazylawzey

🤝 Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests

❓ Support

If you encounter any issues:

  1. Check Troubleshooting section
  2. Check Docker is installed and running
  3. Review Docker logs: docker logs vscode-mysql
  4. Open an issue on GitHub

Made with ❤️ for developers

Quick Links

  • Installation
  • Commands
  • Configuration
  • Troubleshooting

If you find this extension helpful, please give it a ⭐ on GitHub!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft