Running CockroachDB on Windows, Linux, or Mac with a Single Executable

CockroachDB’s main differentiator from other databases is that it presents a consistent view of the database across multiple regions in a cloud environment. By this I mean, a client in Region A can update a row in the invoices table, and this update will be visible to all clients in ALL regions at the same time. No more replication lag. Here is a good explanation of how this works.

But it’s not necessary to use a cloud deployed CockroachDB to learn about it. I like running it locally, and in my post from March I showed how to do this with Docker. But there is an easier way - download a standalone executable. This executable can function as both the database server and SQL client.

You can find the downloads here -

It’s simple to start up the database -

cockroach.exe start-single-node --insecure

Then connect to it using the same executable -

cockroach.exe sql --insecure

For Linux and Mac, the commands are the same, just remove the .exe.

comments powered by Disqus