Announcing the Dolt Workbench Remotes Tab

WORKBENCHFEATURE RELEASE
2 min read

We’re excited to announce a new feature in the Dolt Workbench: the Remotes tab! This allows you to set up remotes and sync your databases with them by pulling and pushing changes. The Dolt Workbench is available for download in the Mac and Windows App stores.

What Are Remotes?

In Dolt, remotes are databases hosted on platforms like DoltHub or DoltLab. They let you push and pull changes between your local database and a remote database, making it easy to collaborate and track changes. The Remotes tab in the Dolt Workbench provides a UI for managing and syncing with these remotes.

Let’s dive into how the Remotes Tab works with a step-by-step example.

Starting a Dolt Database

To get started, let’s create a local Dolt SQL server. If you haven’t installed Dolt yet, follow this guide. After installation, run the dolt sql-server command to initialize an empty Dolt database and start the server. The server will use the default port 3306.

mkdir doltdb && cd doltdb
dolt init
dolt sql-server

Connecting to the Dolt Server

Launch the Dolt Workbench app and connect to your running Dolt SQL server. Enter the connection details (e.g., hostname, port, username, and password), then click Launch Workbench.

connect to dolt sql server

Adding a Remote

To illustrate how remotes work, we'll show how you can push your local Dolt database to DoltHub so that it can be shared with others. First create a database on DoltHub.

create doltdb on DoltHub

To enable pushing to DoltHub, we need to create credentials by running dolt login in the doltdb folder. Here is the guide for more details on setting up authentication.

Now, in the Dolt Workbench app, add the remote by setting the remote name and URL.

add remote

The added remote will show up in the Remotes tab:

added remote

Pushing to a Remote

Let’s add some data to the database using the Dolt Workbench. Create a table:

create table books (id int primary key auto_increment, title varchar(200), author varchar(100));

create table

And commit the changes:

add commit

To push these changes to the remote, go to the Remotes Tab, click the Actions dropdown, and select Push to remote.

actions dropdown

Specify the local branch that contains the changes (main in this example) and click Push.

push to remote

The new table will show up on DoltHub.

books table shown on dolthub

Pulling from a Remote

To pull changes, let’s add a row to the books table directly on DoltHub and commit it to the main branch.

insert into books (title, author) values ('Take Care of Yourself', 'Sophie Calle');

insert a row on dolthub

In Dolt Workbench, navigate to the Remotes Tab, open the Actions dropdown, and select Pull from remote. Specify the remote branch name (main) and click Pull.

pull from remote

The new row will now appear in your local Dolt database:

new row

Conclusion

The Remotes tab in the Dolt Workbench simplifies managing and syncing with remotes like DoltHub or DoltLab, enabling collaboration and data backups.

Have feature requests or questions? Join us on Discord, or file an issue on GitHub.

SHARE

JOIN THE DATA EVOLUTION

Get started with Dolt

Or join our mailing list to get product updates.