Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>MySQL VSC ServerNew to Visual Studio Code? Get it now.
MySQL VSC Server

MySQL VSC Server

Mazy Lawzey

|
817 installs
| (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

MySQL VSC Server

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 "MySQL VSC Server"
  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
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft