No suitable driver found for mysql database (Docker app with mysql app)

Hello.
I’ve deployed my docker app (built in Ktor) via fly.io in ktor app.
Then I’ve done everything specified here → Use a MySQL Database · Fly Docs I’ve named it db app.

In ktor app I’ve setup secrets


For MYSQL_DATABASE I’ve set “db-app.internal” and I’m getting an error in ktor app: No suitable driver found for db-app.internal

What am I missing? How to connect that app with the app holding mysql database?

By digging more, I found a solution.

For anyone with the same issue, MYSQL_DATABASE secret on my ktor app should be set to:
jdbc:mysql://{your app name}.internal/{your db name}

{your app name} is name of the application when you did “fly launch” process.
{your db name} is the name you specified in fly.toml under MYSQL_DATABASE key.

Now it works. Thanks for listening to my TED talk :smiley:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.