← Tüm kılavuzlar
CockroachDB
A distributed SQL database that speaks the PostgreSQL wire protocol — built from the ground up for automatic sharding, replication, and surviving node failures without manual failover work.
Bu kılavuz, yukarıda bağlantısı verilen CockroachDB kendi resmi belgelerinden derlenmiştir — dağıtım ve proje sürümleri zamanla değiştiğinden, bu komutları bir üretim sunucusunda çalıştırmadan önce tam paket/sürüm adlarını her zaman orada kontrol edin.
1Run a single-node instance
A single node is enough to try CockroachDB locally; production deployments run 3+ nodes for real replication and fault tolerance.
docker run -d \ --name cockroachdb \ -p 26257:26257 -p 8088:8080 \ -v ./cockroach/data:/cockroach/cockroach-data \ --restart unless-stopped \ cockroachdb/cockroach:latest start-single-node --insecure2Open the built-in admin UI
http://your-server-ip:80883Connect with any PostgreSQL client
Because CockroachDB implements the PostgreSQL wire protocol, the standard `psql` client and most PostgreSQL drivers/ORMs work against it with no special adapter.
docker exec -it cockroachdb ./cockroach sql --insecureThe --insecure flag is fine for local testing only -- a real deployment should generate TLS certificates and set up proper authentication, covered in CockroachDB's production-deployment docs.