DbSchema is connecting to Cassandra using JDBC Drivers.
What are JDBC Drivers?
JDBC drivers are Java library files with the extension '.jar', used by Java applications to connect to the database.
Usually they are provided by the same company which developed the database software.
DbSchema is an Cassandra Client which already includes
the Cassandra JDBC driver. DbSchema can configure the Cassandra JDBC URL and test the connectivity.
What is the JDBC URL?
The URL is a string (text) with a specific format containing information about the host where the database is running, the port, username, database name, etc.
The URL format is specific to each driver.
Any wrong character in the URL may make the database connectivity fail.
Therefore we recommend installing DbSchema and try to get connected, and you will find the JDBC URL in the connection dialog.
Driver Information
For connecting to Cassandra we wrote our own open-source JDBC driver, available on GitHub.
- Required File(s): cassandra-driver.jar
- Java Driver Class: com.dbschema.Cassandra.JdbcDriver
- URL: jdbc:cassandra://host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[keyspace];dataCenter[&options]]
- Website: DbSchema.com
The driver is wrote on top of the native Cassandra Java Driver.
For connecting to multiple hosts you can pass an URL like: jdbc:cassandra://host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[keyspace];dataCenter[&options]]
Find the DataCenter using 'nodetool status' or 'nodetool -h ::FFFF:127.0.0.1 status'
Connecting using SSL is possible setting the parameters:
javax.net.ssl.trustStore=/path/to/client.truststore&javax.net.ssl.trustStorePassword=password123&
javax.net.ssl.keyStore=/path/to/client.keystore&javax.net.ssl.keyStorePassword=password123
This parameters can be also set in DbSchema.vmoptions file in the installation folder or ./DbSchema.app/Contents/vmoptions.txt on Mac OS, and add:
-Djavax.net.ssl.trustStore=/path/to/client.truststore
-Djavax.net.ssl.trustStorePassword=password123
# If you're using client authentication:
-Djavax.net.ssl.keyStore=/path/to/client.keystore
-Djavax.net.ssl.keyStorePassword=password123
Downloading and Testing the Driver Binaries
Download Cassandra JDBC Driver
The driver files are compressed in a zip file.
Unzip the downloaded archive to get the driver files.
The driver source code can be found on GitHub repository.
Check the github link for details on how to use the driver and configure SSL.
for any issues with the driver, you can write to us.
The driver is written on top of the standard DataStax Java driver.