Friday, August 12, 2011

coldfusion: connecting with postgres as datasource

to setup postgres as coldfusion datasource:

1. download jdbc* driver and place into coldfusion's java lib directory
    (/opt/coldfusionmx/lib or <coldfusion path>/lib)

2. restart cf

3. use dsn details below
    Field Description 
    JDBC URL - jdbc:postgresql://<pgsqlDbHost>/<databaseName> 
    Driver Class - org.postgresql.Driver 
    Driver Name (Optional) (The name of the driver  )
    Username (ColdFusion user account on the database server)
    Password (Password for the user account on the database server )

4. configure postgres to accept tcp/ip connections because java uses tcp/ip connections

    edit postgresql.conf
        set hba_file = '/usr/local/pgsql/data/pg_hba.conf'
        set listen_address = 'localhost,192.168.1.12,etc'

    edit pg_hba.conf, add
        host    all             all     192.168.1.12/32         trust
        host    all             all     192.168.1.13/32         trust
    etc

* using jdbc3

3 comments:

  1. hi i'm still not able to connect the postgresql db ..
    Apperciate for any help

    Connection verification failed for data source : testing
    org.postgresql.util.PSQLException : The connection attempt failed.
    The root cause was that: org.postgresql.util.PSQLException: The connection attempt failed

    ReplyDelete
  2. hi Catherina, what does your coldfusion error log say?

    ReplyDelete
  3. Unable to Solve if PostgreSQL Attempt Failed with Android? Contact to Postgres SQL Support for Windows
    On the off chance that you are not ready to illuminate your PostgreSQL endeavor fizzled issue with android at that point don't stress, we have straightforward and moderate choice to dispose of this issue. You can bother free contact to Cognegic's Postgres SQL Support for Linux or PostgreSQL Remote Database Service. In light of USA, we convey expert dynamic and continuous help for those clients who facing any kind of issue with respect to Postgres. Here we ensure a reaction to basic issue inside 10 to 15 minutes and offers you an adaptable Postgres bolster.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801

    ReplyDelete

SSH : No matching host key type found. Their offer: ssh-rsa,ssh-dss

Got this while connecting to my mikrotik router via ssh   Unable to negotiate with <ip address> port <ssh port>: no matching hos...