---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ydb.tech/docs/en/reference/languages-and-apis/jdbc-driver/quickstart.md?version=main
  - https://ydb.tech/docs/ru/reference/languages-and-apis/jdbc-driver/quickstart.md?version=main
sourcePath: en/core/reference/languages-and-apis/jdbc-driver/quickstart.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# Quick start with JDBC driver

1. Download the [JDBC driver for YDB](https://github.com/ydb-platform/ydb-jdbc-driver/releases).

1. Copy the `.jar` file to the directory specified in the `CLASSPATH` environment variable or load the `.jar` file in your IDE.

1. Connect to YDB. JDBC URL examples:

    <!-- source: en/reference/languages-and-apis/jdbc-driver/_includes/jdbc-url-examples.md -->
    - Local Docker container with anonymous authentication and without TLS:<br/>`jdbc:ydb:grpc://localhost:2136/local`
    - Remote self-hosted cluster:<br/>`jdbc:ydb:grpcs://<host>:2135/Root/<testdb>?secureConnectionCertificate=~/<myca>.cer`
    - A cloud database instance with a token:<br/>`jdbc:ydb:grpcs://<host>:2135/<path/to/database>?tokenFile=~/my_token`
    - A cloud database instance with a service account:<br/>`jdbc:ydb:grpcs://<host>:2135/<path/to/database>?saKeyFile=~/sa_key.json`
    <!-- endsource: en/reference/languages-and-apis/jdbc-driver/_includes/jdbc-url-examples.md -->

1. Execute queries, for example, [YdbDriverExampleTest.java](https://github.com/ydb-platform/ydb-jdbc-driver/blob/master/jdbc/src/test/java/tech/ydb/jdbc/YdbDriverExampleTest.java).
