Skip to main content

Database Connection

BonData connects directly to your PostgreSQL database using standard connection credentials.

Step 1: Prepare Your Database

Ensure your PostgreSQL server is accessible from BonData’s IP addresses. You may need to:
  1. Configure your firewall to allow connections on port 5432 (or your custom port)
  2. Update pg_hba.conf to allow remote connections
  3. Set listen_addresses in postgresql.conf if needed
For security, create a dedicated read-only user for BonData:
-- Create a user for BonData
CREATE USER bondata_user WITH PASSWORD 'your_secure_password';

-- Grant connect access to the database
GRANT CONNECT ON DATABASE your_database TO bondata_user;

-- Grant usage on schema
GRANT USAGE ON SCHEMA public TO bondata_user;

-- Grant select on all tables
GRANT SELECT ON ALL TABLES IN SCHEMA public TO bondata_user;

-- Grant select on future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public
  GRANT SELECT ON TABLES TO bondata_user;

Step 3: Gather Connection Details

Collect the following information:
  • Host: Your database server hostname or IP address
  • Port: Usually 5432
  • Database: The name of the database to connect to
  • User: The username created above
  • Password: The password for the user

Step 4: Connect in BonData

Enter your connection details in BonData to establish the connection.

Required Fields

FieldDescription
HostDatabase server hostname or IP address
PortDatabase server port (default: 5432)
DatabaseName of the database to connect to
UserDatabase username
PasswordDatabase password
BonData supports SSL connections for enhanced security. Contact support if you need to configure SSL certificates.

Available Data

Once connected, BonData can sync:
  • Tables - All tables the user has SELECT access to
  • Views - Database views accessible to the user
  • Custom Queries - Run custom SQL queries to extract specific data