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 Copiar enlaceEnlace copiado en el portapapeles!
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…]
jdbc:postgresql:[//][host][:port][/database][?key=value…]
Example
jdbc:postgresql://localhost/test
jdbc:postgresql://localhost/test
A.2. MariaDB database URL example Copiar enlaceEnlace copiado en el portapapeles!
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))]
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))]
Example
jdbc:mariadb://localhost:3306/test
jdbc:mariadb://localhost:3306/test
A.3. MySQL database URL example Copiar enlaceEnlace copiado en el portapapeles!
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))]
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))]
Example
jdbc:mysql://localhost:3306/test
jdbc:mysql://localhost:3306/test
A.4. Microsoft SQL Server database URL example Copiar enlaceEnlace copiado en el portapapeles!
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]]
jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]
Example
jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks
jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks