2 Dolt
Dolt is a SQL database you can fork, clone, branch, merge, push and pull just like a Git repository. Connect to Dolt just like any MySQL database to run SQL queries. Use the command line interface to import CSV files, commit your changes, push them to a remote, or merge your teammate’s changes.
All the commands you know from Git work exactly the same in Dolt. Git versions files, Dolt versions tables. It’s like Git and MySQL had a baby.
Dolt is a version controlled database. Dolt is Git for Data. Dolt is a Versioned MySQL Replica.
2.1 Version Controlled Database
Dolt is a version controlled SQL database. Connect to Dolt just like any MySQL database to run SQL queries. Use Dolt system tables, functions, or procedures to access version control information and features.
2.2 Git for Data
Dolt is Git for data. Dolt matches the Git CLI exactly. When you would have run git add
, you run dolt add
. When you would have run git commit
, you run dolt commit
.
2.3 Versioned MySQL Replica
Dolt can be deployed as a Versioned MySQL Replica. Because Dolt is MySQL compatible, Dolt can be configured just like any other MySQL replica. A Dolt replica gives you features of a version controlled database without migrating from MySQL.
2.4 Installing Dolt
Dolt is extremely simple to install. Dolt is a single ~100 megabyte program. To install it, you download or compile that program and put it on your PATH. To install in specific operating systems, follow the instructions below:
winget
winget install dolt
Chocolatey
choco install dolt
Both .msi
files and .zip
files are available.
Scoop
scoop install dolt
MSI Files
The easiest way to install Dolt on Windows is to use the MSI files that are provided with each release. They can be found in the Assets section of every release. Grab the latest here.
.zip
Archive
For those preferring to install Dolt manually a zipped archive is provided with the requisite executables. It can be found in assets along with the latest release.
Install Script
The download script for Linux can be used, as OSX is a *nix
system. It will download the appropriate binary, and place it in /usr/local/bin
:
sudo bash -c 'curl -L https://github.com/dolthub/dolt/releases/latest/download/install.sh | bash'
Homebrew
A Homebrew formula is available with with every release, so Mac users using Homebrew for package management can build Dolt from source with a single command:
$ brew install dolt
==> Downloading https://homebrew.bintray.com/bottles/dolt-0.18.3.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/c03cc532d5045fa090cb4e0f141883685de3765bf1d221e400c750b3ae89e328?response-content-disposition=attachment%3Bfilename%3D%22dolt-0.18.3.catalina.bottle.tar.gz%22&Policy=eyJTdGF0
######################################################################## 100.0%
==> Pouring dolt-0.18.3.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/dolt/0.18.3: 7 files, 56.9MB
which will install Dolt as follows:
$ ls -ltr $(which dolt)
lrwxr-xr-x 1 oscarbatori admin 30 Aug 26 16:49 /usr/local/bin/dolt -> ../Cellar/dolt/0.18.3/bin/dolt
MacPorts
On macOS, Dolt can also be installed via a community-managed port via MacPorts:
sudo port install dolt
For Linux users, an installation script is available that will detect your architecture, download the appropriate binary, and place in /usr/local/bin
:
sudo bash -c 'curl -L https://github.com/dolthub/dolt/releases/latest/download/install.sh | sudo bash'
The use of sudo
is required to ensure the binary lands in your path.