-
Notifications
You must be signed in to change notification settings - Fork 0
/
01-dolt.qmd
125 lines (73 loc) · 5.16 KB
/
01-dolt.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
---
output-file: dolt.html
---
# Dolt {#sec-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](/tools.html#sec-version-controlled-database). Dolt is [Git for Data](/tools.html#sec-dolt-for-data). Dolt is a [Versioned MySQL Replica](tools.html#sec-versioned-mysql-replica).
## Version Controlled Database {#sec-version-controlled-database}
Dolt is a [version controlled SQL database](https://www.dolthub.com/blog/2021-09-17-database-version-control/). Connect to Dolt just like any MySQL database to run SQL queries. Use Dolt [system tables](https://docs.dolthub.com/sql-reference/version-control/dolt-system-tables), [functions](https://docs.dolthub.com/sql-reference/version-control/dolt-sql-functions), or [procedures](https://docs.dolthub.com/sql-reference/version-control/dolt-sql-procedures) to access version control information and features.
## Git for Data {#sec-dolt-for-data}
Dolt is [Git for data](https://www.dolthub.com/blog/2020-03-06-so-you-want-git-for-data/). Dolt matches the [Git CLI](https://docs.dolthub.com/cli-reference/cli) exactly. When you would have run `git add`, you run `dolt add`. When you would have run `git commit`, you run `dolt commit`.
## Versioned MySQL Replica {#sec-versioned-mysql-replica}
Dolt can be deployed as a [Versioned MySQL Replica](https://www.dolthub.com/blog/2023-03-15-getting-started-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](https://www.dolthub.com/blog/2021-09-17-database-version-control/) without migrating from MySQL.
## Installing Dolt {#sec-install-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:
::: {.panel-tabset}
### Windows {#sec-install-dolt-windows}
#### winget {#sec-install-dolt-windows-winget .unnumbered}
```bash
winget install dolt
```
<br/>
#### Chocolatey {#sec-install-dolt-windows-chocolatey .unnumbered}
```bash
choco install dolt
```
Both `.msi` files and `.zip` files are available.
<br/>
#### Scoop {#sec-install-dolt-windows-scoop .unnumbered}
```bash
scoop install dolt
```
<br/>
#### MSI Files {#sec-install-dolt-windows-msi .unnumbered}
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](https://github.com/dolthub/dolt/releases/latest).
<br/>
#### `.zip` Archive {#sec-install-dolt-windows-zip .unnumbered}
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](https://github.com/dolthub/dolt/releases/latest).
### macOS {#sec-install-dolt-mac}
#### Install Script {#sec-install-dolt-macos-install-script .unnumbered}
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`:
```bash
sudo bash -c 'curl -L https://github.com/dolthub/dolt/releases/latest/download/install.sh | bash'
```
<br/>
#### Homebrew {#sec-install-dolt-macos-homebrew .unnumbered}
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:
```bash
$ 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:
```bash
$ 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
```
<br/>
#### MacPorts {#sec-install-dolt-macos-macport .unnumbered}
On macOS, Dolt can also be installed via a [community-managed port](https://ports.macports.org/port/dolt/) via [MacPorts](https://www.macports.org/):
```bash
sudo port install dolt
```
### Linux {#sec-install-dolt-linux}
For Linux users, an installation script is available that will detect your architecture, download the appropriate binary, and place in `/usr/local/bin`:
```bash
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.
:::