Announcing the Dolt Workbench Remotes Tab
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
.
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.
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.
The added remote will show up in the Remotes
tab:
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));
And commit the changes:
To push these changes to the remote, go to the Remotes
Tab, click the Actions
dropdown, and select Push to remote
.
Specify the local branch that contains the changes (main
in this example) and click Push
.
The new table will show up 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');
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
.
The new row will now appear in your local Dolt database:
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.