Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.36 KB

insecure-test-cluster.md

File metadata and controls

48 lines (36 loc) · 1.36 KB

CockroachDB replicates and distributes data for you behind-the-scenes and uses a Gossip protocol to enable each node to locate data across the cluster.

To test this, use the built-in SQL client locally as follows:

  1. On your local machine, launch the built-in SQL client, with the --host flag set to the address of any node:

    {% include copy-clipboard.html %}

    $ cockroach sql --insecure --host=<address of any node>
  2. Create an insecurenodetest database:

    {% include copy-clipboard.html %}

    > CREATE DATABASE insecurenodetest;
  3. Use \q or ctrl-d to exit the SQL shell.

  4. Launch the built-in SQL client, with the --host flag set to the address of a different node:

    {% include copy-clipboard.html %}

    $ cockroach sql --insecure --host=<address of different node>
  5. View the cluster's databases, which will include insecurenodetest:

    {% include copy-clipboard.html %}

    > SHOW DATABASES;
    +--------------------+
    |      Database      |
    +--------------------+
    | crdb_internal      |
    | information_schema |
    | insecurenodetest   |
    | pg_catalog         |
    | system             |
    +--------------------+
    (5 rows)
    
  6. Use \q to exit the SQL shell.