dokku / dokku-mariadb

a mariadb plugin for dokku
MIT License
73 stars 26 forks source link

Update DATABASE_URL to match the JDBC spec for various connectors #141

Closed samtoxie closed 7 months ago

samtoxie commented 7 months ago

Various official MariaDB connectors use a different scheme (JDBC) than dokku-mariadb provides. This for example causes problems in Spring Boot using the mariadb connector, where it fails to connect to the database.

Here are some examples of connectors that use the JDBC spec:

Though MySQL connectors do often support the current scheme, MariaDB connectors often do not. This mergerequest adjusts the DATABASE_URL to match this spec.

josegonzalez commented 7 months ago

Providing a DSN is probably the most standard way to provide connection information and the Dokku project will not be offering any official alternative for plugins it maintains. I would recommend wrapping your client with something that parses the DSN and sets up the connection internally if the official library won't support it.