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
This article example shares the specific code of ...
Simulation tables and data scripts Copy the follo...
Introduction When we use the MySQL database, we a...
Table of contents Overview in operator refinement...
The detailed process of installing python3.7.0 on...
background: I have done a project before, which r...
Preface: Partitioning is a table design pattern. ...
1. HBase Overview 1.1 What is HBase HBase is a No...
This article shares the specific code of JavaScri...
What is Vite? (It’s a new toy on the front end) V...
This article example shares the specific code of ...
This article shares with you the installation tut...
The method of wrapping the content (title attribut...
1.watch listener Introducing watch import { ref, ...
1. Phenomenon In the early morning, an index was ...