Appendix A. JDBC database connection URLs for databases with production and development support


You can use a JDBC database connection URL to connect to a relational database. Each database has its own format of the database URL that contains information about the database itself and other configuration properties.

The following examples show you JDBC database connection URLs for databases that have been tested with Red Hat build of Quarkus. For more information about supported databases and versions, see the Red Hat build of Quarkus Supported Configurations page.

A.1. PostgreSQL database URL example

PostgreSQL runs only as a server. You must specify connection details or use the default values.

Configuration options

jdbc:postgresql:[//][host][:port][/database][?key=value…​]
Copy to Clipboard Toggle word wrap

Example

jdbc:postgresql://localhost/test
Copy to Clipboard Toggle word wrap

A.2. MariaDB database URL example

MariaDB only runs as a server. You must specify connection details or use the default values.

Configuration options

jdbc:mariadb:[replication:|failover:|sequential:|aurora:]//<hostDescription>[,<hostDescription>…​]/[database][?<key1>=<value1>[&<key2>=<value2>]] hostDescription:: <host>[:<portnumber>] or address=(host=<host>)[(port=<portnumber>)][(type=(master|slave))]
Copy to Clipboard Toggle word wrap

Example

jdbc:mariadb://localhost:3306/test
Copy to Clipboard Toggle word wrap

A.3. MySQL database URL example

MySQL runs only as a server. You must specify connection details or use the default values.

Configuration options

jdbc:mysql:[replication:|failover:|sequential:|aurora:]//<hostDescription>[,<hostDescription>…​]/[database][?<key1>=<value1>[&<key2>=<value2>]] hostDescription:: <host>[:<portnumber>] or address=(host=<host>)[(port=<portnumber>)][(type=(master|slave))]
Copy to Clipboard Toggle word wrap

Example

jdbc:mysql://localhost:3306/test
Copy to Clipboard Toggle word wrap

A.4. Microsoft SQL Server database URL example

Microsoft SQL Server uses default system values unless you specify different values. The Microsoft SQL Server JDBC drivers function the same way as other drivers. The connection URL should be in the following format:

Configuration options

jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]
Copy to Clipboard Toggle word wrap

Example

jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks
Copy to Clipboard Toggle word wrap

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat