The driver supports User ID/password authentication. It authenticates the user to the database using a user name and password.

Take the following steps to configure user ID/Password authentication.

  1. Set the ServerName property to the IP address or server name of the primary database server.
  2. Set the PortName property to the TCP port of the primary database server that is listening for connections to the database.
  3. Set the DatabaseName property to the name of the database to which you want to connect.
  4. Set the User property to provide the user ID.
  5. Set the Password property to provide the password.
For example, the following is a connection string with only the required properties for making a connection using user ID/password authentication.
Note: The User ID and Password properties are not required to be stored in the connection string. They can also be passed separately by the application.
Connection conn = DriverManager.getConnection 
("jdbc:datadirect:redshift://MyServer:5439;DatabaseName=MyDB;
  User=JSmith;Password=secret);