DEV Community

Ayra Jett for Bytebase

Posted on β€’ Originally published at bytebase.com

2 2 2 2 2

Run a Local πŸ’» MySQL 🐬 Instance

This document describes how to run a MySQL instance locally with Docker and how to add it as an Instance for testing purpose.

Step 1 - Start a local MySQL server in Docker

  1. Start Docker.
  2. Run the command in the terminal

    docker run --name mysqld \
      --publish 3306:3306 \
      -e MYSQL_ROOT_HOST=172.17.0.1 \
      -e MYSQL_ROOT_PASSWORD=testpwd1 \
      mysql/mysql-server:8.0
    

The setup below is for testing purpose and should NOT be used in production setup. Also the MySQL data will be wiped out after the container stops.

Step 2 - Add the MySQL Server as an Instance

  1. Click Instances on the top bar.
  2. Click Add Instance on the instances page, and you will see Create Instance dialog box.
  3. Fill the fields as follows:
    • Choose MySQL
    • Instance Name: MySQL Docker for Test
    • Environment: Test
    • Host or Socket: host.docker.internal
    • Port: 3306
    • Username: root
    • Password: testpwd1
  4. Click Create, and you can see the newly added instance in the table.

Postmark Image

20% off for developers shipping features, not fixing email

Build your product without worrying about email infrastructure. Our reliable delivery, detailed analytics, and developer-friendly API let you focus on shipping features that matter.

Start free

Top comments (0)

ACI image

ACI.dev: Fully Open-source AI Agent Tool-Use Infra (Composio Alternative)

100% open-source tool-use platform (backend, dev portal, integration library, SDK/MCP) that connects your AI agents to 600+ tools with multi-tenant auth, granular permissions, and access through direct function calling or a unified MCP server.

Check out our GitHub!

Join the Runner H "AI Agent Prompting" Challenge: $10,000 in Prizes for 20 Winners!

Runner H is the AI agent you can delegate all your boring and repetitive tasks to - an autonomous agent that can use any tools you give it and complete full tasks from a single prompt.

Check out the challenge

DEV is bringing live events to the community. Dismiss if you're not interested. ❀️