Preface This article mainly introduces the relevant content about the Mysql8.0 driver getTables returning all the tables in the library. The MySQL Connector/J 8.0 version driver is backward compatible with the previous 5.5+ version of MySQL. If you are using 5.5+ version of MySQL, you can upgrade to the 8.0 version driver. If you are using the 5.X version of the driver, you need to change the Driver Class to: It should be noted that: The parameters related to the driver DataSource in version 8.0 have changed: For example, the 8.0 version driver changes the default value of the parameter nullCatalogMeansCurrent from true to false. If you use // By default, all database tables are returned, not just the database specified by datasource databaseMetaData.getTables(null, null, null, new String[]{"TABLE"}) The solution is to change this parameter to true when the connection pool is initialized. Take HikariCP as an example: Java Config: HikariConfig config = new HikariConfig(); ... config.addDataSourceProperty("nullCatalogMeansCurrent", true); Spring Boot Configuration: spring.datasource.hikari.data-source-properties.nullCatalogMeansCurrent=true For other parameter changes, please refer to [official documentation] Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of samba + OPENldap to build a file sharing server
>>: Vue.set() and this.$set() usage and difference
Separate the front and back ends and use nginx to...
1. Find out whether MySQL was installed before Co...
Table of contents The pitfalls Filling method Wha...
Table of contents Preface Rationale Procedure 1. ...
Preface This article introduces a tutorial on how...
Table of contents 1. What is Docker Compose? 2. D...
Table of contents 1. for loop: basic and simple 2...
View installation and uninstallation # View rpm -...
In this section, we will learn about list element...
Template 1: login.vue <template> <p clas...
mysqlslap Common parameter description –auto-gene...
Table of contents Preface 1. Introduction to one-...
1. scale() method Zoom refers to "reducing&q...
Recently, we need to perform a scheduled migratio...
◆Add to favorites illustrate Click to add your we...