Error Cause & Solution:
1. Configuration is wrong: driver=com.mysql.jdbc.Driver
.
2. Wrong database connection address: url=jdbc:mysql://localhost:3306/test
(test is user-defined creation, variable).
3. Wrong password or account: username=root
(default is root).
4. Wrong account: password=root
(password is set by the user).
5. The database is not started or not authorized to access.
6. The corresponding driver jar package mysql-connector-java-5.1.6-bin.jar
has not been introduced, or the mysql-connector-java
dependency has not been injected in the Maven project.
Read More:
- [Solved] java.sql.SQLException: Unknown system variable cache query size
- [Solved] Cannot find class: com.mysql.jdbc.Driver
- Error querying database.Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource.
- How to Solve JDBC connection error in spring MVC integration
- [Solved] IDEA Error: Unknown system variable ‘tx_isolation‘ at
- javaweb Connect Datas Error: che.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1444)
- [Solved] Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException
- How to Solve Error: No suitable driver found for
- [Solved] springboot Project Run Error: HikariPool-1 – Exception during pool initialization.
- Java database Druid error: com.alibaba.druid.pool.DruidDataSource error
- [Solved] java.sql.SQLException: Unsupported character encoding ‘utf-8
- [Solved] init datasource error, url: jdbc:mysql://localhost:3306/test
- [Solved] mybatis Error querying database. Cause: java.sql.SQLException: The server time zone value
- [Solved] Sprintboot hikari initialize error: ERROR 27468 — [nio-8080-exec-1] com.zaxxer.hikari.pool.HikariPoolHikariPool
- Error querying database. Cause: java.sql.SQLSyntaxErrorException: Expression #2 of SELECT list is no
- [Solved] Springboot Error: Error creating bean with name ‘dataSource‘ defined in class path resource
- [Solved] Springboot connect MySQL error: errorcode 0, state 08s01
- Public Key Retrieval is not allowed [How to Solve]
- Mybatis reports an error (error building sqlsession.) when using annotations without deleting redundant files
- Hibernate Error: Error executing DDL “create table course (xxx)“