Wener Notes

CockroachDB

约 1 分钟阅读

Tips

  • BSL 协议
    • Can host CockroachDB as a service for internal use at organization
    • third parties cannot modify table schemas.
  • DesignGitHub Filecockroachdb/cockroach/docs/design.md
  • Known Limitations
    • Database and table renames are not transactional
    • DISTINCT operations cannot operate over JSON values

www.cockroachlabs.com/docs/stable/migrate-from-mysql.html www.cockroachlabs.com/docs/stable/migrate-from-postgres.html

www.cockroachlabs.com/docs/stable/postgresql-compatibility.html CockroachDB is compatible with PostgreSQL 9.5 and works with majority of PostgreSQL database

bash
brew install cockroach
docker pull cockroachdb/cockroach:v2.1.0

# http://localhost:26256
cockroach start --insecure

本地集群

bash
# 第一个节点
cockroach start --insecure --listen-addr=localhost
# 第二个节点
cockroach start \
  --insecure \
  --store=node2 \
  --listen-addr=localhost:26258 \
  --http-addr=localhost:8081 \
  --join=localhost:26257
# 第三个节点
cockroach start \
  --insecure \
  --store=node3 \
  --listen-addr=localhost:26259 \
  --http-addr=localhost:8082 \
  --join=localhost:26257

# 命令行
cockroach sql --insecure --host=localhost:26257

关联信息

反向链接、本文链接的其他页面和外部资料。

反向链接

  • Database Awesome
    笔记 · cdb

    | name | stand for | · | Relational DBMS | 关系型数据库 | · | Key-value stores | KV 存储 | · | Document stores | 文档存储 | · | Time Series DBMS | 时序数据库 |

References

GitHub2 条
其他外链5 条
最近更新commit 906e816Edit

On this page