Este contenido no está disponible en el idioma seleccionado.

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

Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat