The connect command connects to the
database specified by
ConnectionURLString. It connects by issuing a
getConnection request with the specified URL, using
javax.sql.DataSource to set the current
connection to that URL.
CONNECT ConnectionURLString [ AS Identifier ]
The URL of the database. Note that this URL typically includes connection parameters such as user name, password, or security options.
The optional name that you want to assign to the connection.
If the connection succeeds, the connection becomes the current one and all further commands are processed against the new, current connection.
Example 1: Connecting on a Cluster
If you are running Splice Machine on a cluster, connect from a machine that is NOT running an HBase RegionServer and specify the IP address of a regionServer node, e.g. 10.1.1.110.
splice> connect 'jdbc:splice://regionServer:1527/splicedb';
This example includes a user ID and password in the connection URL string:
splice> connect 'jdbc:splice://184.108.40.2066:1527/splicedb;user=YourUserId;password=YourPassword';
And this example includes specifies that SSL peer authentication will be enabled for the connection:
splice> connect 'jdbc:splice://220.127.116.116:1527/splicedb;user=YourUserId;password=YourPassword;ssl=peerAuthentication';
You can only connect with SSL/TLS if your administrator has configured this capability for you.
Example 2: Connecting to the Standalone Version
If you’re using the standalone version of Splice Machine, specify localhost instead.
splice> connect 'jdbc:splice://localhost:1527/splicedb';
Here is an example that includes a user ID and password in the connect string:
splice> connect 'jdbc:splice://localhost:1527/splicedb;user=joey;password=bossman';