User ID and password authentication
- Last Updated: August 6, 2024
- 1 minute read
- DataDirect Connectors
- JDBC
- PostgreSQL 6.0
- Documentation
The driver supports user ID/password authentication. It authenticates the user to the database using a username and password.
The driver supports the MD5, SCRAM-SHA-256, and SCRAM-SHA-256-PLUS password hashing mechanisms for user ID/password authentication. During connection, the driver detects and uses the most secure method supported by the server.
Take the following steps to configure user ID/Password authentication.
- Specify values for minimum required properties for establishing a connection.
- Set the ServerName property to specify either the IP address in IPv4 or IPv6 format, or the server name for your server.
- Set the PortNumber property to specify the TCP port of the primary database server that is listening for connections to the database.
- Set the User property to specify the user name that is used to connect to the database.
- Set the Password property to specify the password.
Connection conn = DriverManager.getConnection
("jdbc:datadirect:postgresql://server1:5432;
User=test;Password=secret);Note: The User and Password properties are
not required to be stored in the connection string. They can also be passed separately by
the application.