Verify the Cluster
Ensure that your cluster is working properly:
1. Open an SQL shell on the first node. Create a database and a table and insert some rows into it.
cockroach sql --certs-dir=certs --host=localhost:2000
2. Connect to a different node to verify cross-node communication. Start a SQL session with node2.
cockroach sql --certs-dir=certs --host=localhost:2001
3. Verify your data is accessible across the cluster by running a SELECT query. You should see the same rows here as you inserted into node1 earlier.
Here we see the same data we inserted into node1, affirming that our cluster is working properly and all data is being synced across the nodes.
How to Install CockroachDB Cluster on Debian 12
Debian 12 is a versatile and robust operating system ideal for hosting various applications, including distributed databases like CockroachDB. In this guide, we’ll walk through the process of installing and setting up a CockroachDB cluster on Debian 12. CockroachDB is a scalable, distributed SQL database designed for cloud-native applications, and installing it on Debian 12 provides a reliable foundation for building resilient and high-performance database clusters.
Contact Us