Level Up Coding

Coding tutorials and news. The developer homepage gitconnected.com && skilled.dev && levelup.dev

Follow publication

Member-only story

[Database] Dolt — A git like database powered by MySQL (OpenSource)

Sarvsav Sharma
Level Up Coding
Published in
7 min readJul 23, 2023

Dolt is

Git for data
The world’s first and only version-controlled SQL database.

Articles in the series:

  1. Introduction to Dolt.
  2. Introduction to DoltHub.
Source: dolthub/dolt

What is dolt?

Dolt is a powerful database, and gives you an ability that a version control system git has like fork, clone, merge, push, and pull in addition to storing your raw data in structured order and do sql like queries on it. In Git the files are versioned, and in Dolt it’s the tables.

Features of dolt:

  1. Open source.
  2. A version control system like Git.
  3. SQL Interface.
  4. Easy and instant to rollback.
  5. Powerful collaboration tools.
  6. Easily deployed as Production DB as well as integrate as backup replica to your existing database.
  7. Hosted plan that is managed by dolt team.

Installation:

Download the binary for your operating system from their release page, and add it to your PATH variable and can also be build from source. Once it is installed, you can test it by running the version command.

➜  dolt version
dolt version 1.8.2
no valid database in this directory

Starting the server:

Let’s follow the design used by MongoDB server, and create a directory named $HOME/opt/dolt/data/db to store the data.

mkdir -p $HOME/opt/dolt/data/db

Every database created inside the mysql using command create database demodb will be stored inside this directory with name $HOME/opt/dolt/data/db/demodb.

By default, the dolt binary has integrated mySql server.

# Change to db directory
cd $HOME/opt/dolt/data/db
# Start the server from db directory
➜ dolt sql-server
Starting server with Config HP="localhost:3306"|T="28800000"|R="false"|L="info"|S="/tmp/mysql.sock"
2023-07-22T17:30:35+02:00 INFO [no conn] Server ready. Accepting connections. {}

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Written by Sarvsav Sharma

Mostly writes about Go, GitHub, and DevSecOps. Interested in distributed systems. GitHub:sarvsav Maintainer:go-feature-flag/gofeatureflag-lint-action

No responses yet

Write a response