# Environment Variable for JDBC Connect URL

**URL:** <https://forum.inductiveautomation.com/t/environment-variable-for-jdbc-connect-url/82820>\
**Category:** Ignition\
**Tags:** database\
**Created:** [December 7, 2023, 3:22am UTC](https://forum.inductiveautomation.com/t/environment-variable-for-jdbc-connect-url/82820 "2023-12-07T03:22:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewdhunt7](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@andrewdhunt7](https://forum.inductiveautomation.com/u/andrewdhunt7)\
**Post date:** [December 7, 2023, 3:22am UTC](https://forum.inductiveautomation.com/t/environment-variable-for-jdbc-connect-url/82820/1 "2023-12-07T03:22:23Z")

</div>

Not sure if what I'm looking to do is missing a small piece of syntax or is unsupported. Say I have a database connection where the connect string property is

> jdbc:mysql://localhost:3306/test

If I have that stored to an environment variable $MY\_VAR (which I can correctly print in Ignition context and get the same _jdbc:mysql://localhost:3306/test_ returned), what would I have to put in the DB connect string information to get it to expand the environment variable and process the value as the connection? Right now everything I have tried simply processes as a string literal of whatever variation of $MY\_VAR and tells me there is no appropriate driver type

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 7, 2023, 12:47pm UTC](https://forum.inductiveautomation.com/t/environment-variable-for-jdbc-connect-url/82820/2 "2023-12-07T12:47:35Z")

</div>

No such functionality. Sorry.

The closest you can get in a supported fashion is to use a locally-defined domain name in the database URL, where it is resolved from `/etc/hosts` or a similar local resource.

---

<div class="post-metadata">

**Author:** ![andrewdhunt7](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@andrewdhunt7](https://forum.inductiveautomation.com/u/andrewdhunt7)\
**Post date:** [December 7, 2023, 3:07pm UTC](https://forum.inductiveautomation.com/t/environment-variable-for-jdbc-connect-url/82820/3 "2023-12-07T15:07:16Z")

</div>

Got it, thank you
