Does database connection URI field support variables?

I’ve integrated my secret solution with script elements to pass credentials as variables to connect to a MySQL database and run queries, and it works fine with the terminal element.

But when I try to use the MySQL database element and use these credential variables within the URI string, it just does not change into the variable values during the connection attempt.

Here’s my working setup with the terminal element:

MYSQL_HOST={{ var.DBHOST }} 
MYSQL_USER={{ var.DBUSER }}
MYSQL_PASSWORD={{ var.DBPASS }}
mysql -h $MYSQL_HOST -u $MYSQL_USER -p$MYSQL_PASSWORD database_name -e "select * from table_name where column1 not like '%test-%';"

How can I properly use these credential variables with the MySQL database URI?

protocol://user:password@host:port/db

I’ve tried many things like;
mysql://{{ var.DBUSER }}:{{ var.DBPASS }}@{{ var.DBHOST }}:3306/database_name

but unfortunately no joy.

Hi @umutkacar, I believe this should work as is. Here’s an example from one of our internal runbooks.

What version of Atuin Desktop are you currently running?

1 Like

Hi @BinaryMuse ,

Somehow it worked when I re-typed it. Thanks for your response.
I’m currently on 0.0.93 (20250808.111723). It seems it’s the latest for now.

Now that I’m able to connect to the database, I have a new problem:

My current use case involves some enum columns, do you plan to support these as well?

Glad it’s sorted! We absolutely intend on supporting enums - and I was not aware it didn’t work right now, so thank you for reporting it!

I’ve opened an issue and will get to it ASAP

1 Like