# Trying to connect Temporal with external yugabyte database

**URL:** <https://community.temporal.io/t/trying-to-connect-temporal-with-external-yugabyte-database/3536>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [December 7, 2021, 5:18am UTC](https://community.temporal.io/t/trying-to-connect-temporal-with-external-yugabyte-database/3536 "2021-12-07T05:18:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![poojabhutada](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/poojabhutada/32/3372_2.png) [@poojabhutada](https://community.temporal.io/u/poojabhutada)\
**Post date:** [December 7, 2021, 5:18am UTC](https://community.temporal.io/t/trying-to-connect-temporal-with-external-yugabyte-database/3536/1 "2021-12-07T05:18:56Z")

</div>

I am trying to connect to external yugabyte database with Temporal. Facing below issue :

> temporal | + temporal-sql-tool --plugin postgres --ep \<db\_ip\> -u admin -p \<db\_port\> create --db temporal  
> temporal-web | [2021-12-07T04:46:53.389Z] Auth is disabled in config  
> temporal | 2021-12-07T04:46:54.061Z ERROR Unable to create SQL database. {“error”: “unable to connect to DB, tried default DB names: postgres,defaultdb, errors: [pq: no pg\_hba.conf entry for host "\<ip\_address\>", user "admin", database "postgres", SSL off pq: no pg\_hba.conf entry for host "\<ip\_address\>", user "admin", database "defaultdb", SSL off]”, “logging-call-at”: “handler.go:97”}

Below are the contents of my files :  
**docker-compose.yml :**

> version: “3.5”  
> services:  
> temporal:  
> container\_name: temporal  
> environment:  
> - DB=postgresql  
> - DB\_PORT=\*\*\*\*  
> - POSTGRES\_USER=\*\*\*\*  
> - POSTGRES\_PWD=\*\*\*\*  
> - POSTGRES\_SEEDS=\*\*\*  
> - DYNAMIC\_CONFIG\_FILE\_PATH=config/dynamicconfig/development.yaml  
> image: temporalio/auto-setup:1.13.1  
> networks:  
> - temporal-network  
> ports:  
> - 7233:7233  
> volumes:  
> - ./dynamicconfig:/etc/temporal/config/dynamicconfig  
> temporal-admin-tools:  
> container\_name: temporal-admin-tools  
> depends\_on:  
> - temporal  
> environment:  
> - TEMPORAL\_CLI\_ADDRESS=temporal:7233  
> image: temporalio/admin-tools:1.13.1  
> networks:  
> - temporal-network  
> stdin\_open: true  
> tty: true  
> temporal-web:  
> container\_name: temporal-web  
> depends\_on:  
> - temporal  
> environment:  
> - TEMPORAL\_GRPC\_ENDPOINT=temporal:7233  
> - TEMPORAL\_PERMIT\_WRITE\_API=true  
> image: temporalio/web:1.13.0  
> networks:  
> - temporal-network  
> ports:  
> - 8088:8088  
> networks:  
> temporal-network:  
> driver: bridge  
> name: temporal-network

**development.yaml :**

> frontend.enableClientVersionCheck:
> 
> - value: true  
> constraints: {}  
> history.persistenceMaxQPS:
> - value: 3000  
> constraints: {}  
> frontend.persistenceMaxQPS:
> - value: 3000  
> constraints: {}  
> frontend.historyMgrNumConns:
> - value: 10  
> constraints: {}  
> frontend.throttledLogRPS:
> - value: 20  
> constraints: {}  
> history.historyMgrNumConns:
> - value: 50  
> constraints: {}  
> history.defaultActivityRetryPolicy:
> - value:  
> InitialIntervalInSeconds: 1  
> MaximumIntervalCoefficient: 100.0  
> BackoffCoefficient: 2.0  
> MaximumAttempts: 0  
> history.defaultWorkflowRetryPolicy:
> - value:  
> InitialIntervalInSeconds: 1  
> MaximumIntervalCoefficient: 100.0  
> BackoffCoefficient: 2.0  
> MaximumAttempts: 0  
> system.advancedVisibilityWritingMode:
> - value: “off”  
> constraints: {}  
> persistence:  
> defaultStore: default  
> visibilityStore: visibility  
> numHistoryShards: 512  
> datastores:  
> default:  
> sql:  
> pluginName: “postgres”  
> databaseName: “temporal”  
> connectAddr: \*\*\*\*  
> connectProtocol: “tcp”  
> user: \*\*\*\*  
> password: \*\*\*\*  
> visibility:  
> sql:  
> pluginName: “postgres”  
> databaseName: “temporal”  
> connectAddr: \*\*\*\*  
> connectProtocol: “tcp”  
> user: \*\*\*\*  
> password: \*\*\*\*

Need help on this. Please guide if I am missing anything.

---

<div class="post-metadata">

**Author:** ![poojabhutada](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/poojabhutada/32/3372_2.png) [@poojabhutada](https://community.temporal.io/u/poojabhutada)\
**Post date:** [December 10, 2021, 9:42am UTC](https://community.temporal.io/t/trying-to-connect-temporal-with-external-yugabyte-database/3536/2 "2021-12-10T09:42:29Z")

</div>

@tihomir @maxim Request you to please guide on the same

---

<div class="post-metadata">

**Author:** ![poojabhutada](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/poojabhutada/32/3372_2.png) [@poojabhutada](https://community.temporal.io/u/poojabhutada)\
**Post date:** [December 10, 2021, 12:58pm UTC](https://community.temporal.io/t/trying-to-connect-temporal-with-external-yugabyte-database/3536/3 "2021-12-10T12:58:24Z")

</div>

Want to understand if there is any way to set the connection URL parameters with this configuration : ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory or way to pass CA certificate.

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [December 17, 2021, 4:14am UTC](https://community.temporal.io/t/trying-to-connect-temporal-with-external-yugabyte-database/3536/4 "2021-12-17T04:14:57Z")

</div>

Yugabyte posted this blog that might be of interest to you: [Getting Started with YugabyteDB, Temporal, and the Temporal-Maru Benchmarking Tool - The Distributed SQL Blog](https://blog.yugabyte.com/getting-started-yugabytedb-temporal/)

---

<div class="post-metadata">

**Author:** ![eric1pratt](https://avatars.discourse-cdn.com/v4/letter/e/838e76/32.png) [@eric1pratt](https://community.temporal.io/u/eric1pratt)\
**Post date:** [December 17, 2021, 7:30pm UTC](https://community.temporal.io/t/trying-to-connect-temporal-with-external-yugabyte-database/3536/5 "2021-12-17T19:30:26Z")

</div>

Hi Poojab,  
I work for Yugabyte and based on the error you may need to adjust your yugabytedb as well:  
please refer to this doc for setting up the hba\_\_conf\_csv with yugabyte;

> **[Configure ysql\_hba\_conf\_csv | YugabyteDB Docs](https://docs.yugabyte.com/latest/secure/enable-authentication/ysql_hba_conf-configuration/)**
>
> Use the ysql\_hba\_conf\_csv flag to configure client authentication in YSQL.
