How to Get Started with Dolt Workbench: Your Modern SQL Playground

Dec 6, 2023 | Programming

Dolt Workbench is here to revive your SQL experience with its modern, browser-based interface that connects seamlessly to MySQL and PostgreSQL-compatible databases. This article will guide you through the remarkable features and setup process, along with some troubleshooting tips to enhance your experience.

Features of Dolt Workbench

Whether you’re a seasoned database administrator or an eager beginner, Dolt Workbench offers a plethora of functionalities:

  • Modern, Web-based Table Browser: Say goodbye to those outdated SQL interfaces! Dolt Workbench offers an intuitive UI for browsing table data.
  • Auto-generate SQL Queries: No SQL knowledge? No problem! Generate queries from table cell buttons while learning along the way.
  • Edit Data with Point-and-Click: Double-click cells to modify values and easily manipulate rows and tables using helper buttons.
  • Entity-Relationship (ER) Diagrams: Visualize your database structure effortlessly with ER diagrams, making analysis a breeze.
  • File Uploads: Import data directly through the interface from spreadsheets or local files.

Version Control Features with Dolt

Dolt isn’t just a database; it’s a game-changer in version control:

  • Commit Log Visualizations: Easily track commits and gain insights into your projects through a visual commit graph.
  • Branch Navigation: Create branches to group related changes for easier management and review.
  • Tags: Label your data at specific points for easy identification of changes, allowing for efficient data tracking and recreation.
  • Pull Requests: Propose changes to your database in a structured manner, facilitating collaboration among team members.

Getting Started with Dolt Workbench

Setup with Docker

The easiest approach to start using Dolt Workbench is via Docker. Follow these simple steps:

% docker pull dolthub/dolt-workbench:latest
% docker run -p 9002:9002 -p 3000:3000 dolthub/dolt-workbench:latest

Navigate to http://localhost:3000 to enter your database information. Additional instructions can be found on Docker Hub.

Saving Connection Information

To retain connection metadata between Docker runs, you have two options:

  • Using the File Store: Mount a local directory to the app’s store directory.
  • % docker run -p 9002:9002 -p 3000:3000 -v ~/path/to/store:/app/graphql-server/store dolthub/dolt-workbench:latest
  • Persist with MySQL: Use environment variables or a .env file to manage connection details.
  • # .env file example
    DW_DB_DBNAME=dolt_workbench
    DW_DB_PORT=3306
    DW_DB_USER=username
    DW_DB_PASS=password
    DW_DB_HOST=host.docker.internal

Starting from Source

If you prefer setting up from the source code, clone the repository and run the necessary servers:

% cd graphql-server
% yarn
% yarn compile
% yarn dev

Then, in another shell, start the web server:

% cd packages/web
% yarn
% yarn compile
% yarn dev

Finally, open your browser to http://localhost:3002.

Troubleshooting Tips

If you encounter issues while setting up Dolt Workbench, here are a few troubleshooting ideas:

  • Ensure that Docker is running correctly and that you have the latest version installed.
  • Check your environment variables for any typos or incorrect settings.
  • Verify that your database is created before running the Docker commands.
  • For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox