Connection guide

Connect CockroachDB

CockroachDB uses PostgreSQL syntax for users, grants, and default privileges.

Create a dedicated user

CREATE USER with a secure password.

CREATE USER unitylayer_user WITH PASSWORD 'your_secure_password';

Grant connection permission

GRANT CONNECT ON DATABASE.

GRANT CONNECT ON DATABASE your_database TO unitylayer_user;

Grant schema usage

GRANT USAGE ON required schemas.

GRANT USAGE ON SCHEMA public TO unitylayer_user;
GRANT USAGE ON ALL SCHEMAS IN DATABASE your_database TO unitylayer_user;

Grant read permissions

GRANT SELECT with default privileges.

GRANT SELECT ON ALL TABLES IN SCHEMA public TO unitylayer_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO unitylayer_user;

Verify user permissions

SHOW GRANTS FOR unitylayer_user.

SHOW GRANTS FOR unitylayer_user;

When setup is complete, open Connect database in the data catalog to enter credentials and test the connection.