Skip to content
Docs
Connection
Postgresql

Connect to Postgresql

Use Chat2DB to quickly connect to Postgresql server

Step 1: Create a new connection

'PGsql2'

Click the database button on the left, select New Connection, and select Postgresql

Step 2: Fill in the connection information

'PGsql'

  • Name: The connection name can be customized to facilitate memory.
  • Env: Select the connection environment, testing, production, etc. to distinguish connections in different environments
  • Host: Postgresql server address, which can be IP or domain name
  • Port: Postgresql server port, default 5432
  • Authentication: Postgresql authentication method, username and password or no authentication required
  • User: Postgresql username
  • Password: Postgresql password
  • Database: Postgresql database name, optional, if not filled in, it will connect to the default database
  • URL: Postgresql connection URL, optional, it will be automatically generated based on the above information if not filled in
  • Driver: Postgresql driver, optional. If not filled in, it will be automatically identified based on the URL. You can also select it manually. After manual selection, the driver configuration items will be displayed.
  • SSH: Whether to use SSH connection, optional. If not filled in, it will be disabled by default. SSH configuration items will be displayed after selection.
  • Advanced Configuration: Advanced configuration, optional, not used by default if not filled in, advanced configuration items will be displayed after selection

Step 3: Download the driver

'driver'

If you do not select a driver, you need to download the Postgresql driver. Click the download button Download Driver to download the latest Postgresql driver. You can also manually upload your own driver Upload driver

Step 4: Configure SSH channel

'ssh'

  • USE SSH: whether to use SSH channel
  • SSH Host: SSH server address
  • SSH Port: SSH server port default 22
  • Authentication: SSH authentication method, username, password or private key
  • User: SSH username
  • Password: SSH password
  • Test the SSH connection: Test whether the SSH connection is normal

Step 5: Test connection

'ssh'

Click the test button in the lower left corner to test whether the connection is normal. If the connection is normal, the connection will be successful. Otherwise, the connection will be failed. You can adjust the connection information according to the error message.

Step 6: Save the connection

'ssh'

After the test connection passes, click the Save button to save the connection information. The connection information will be displayed in the database list on the left. Click the connection information to view the connection details or delete the connection.