Error reporting when deploying an open source project
ERROR com.alibaba.druid.pool.DruidDataSource - init datasource error, url jdbcmysql://
Obviously, there is a database connection error
But after eliminating the error, I can find the real cause of the error
Database connection address error
Network problems
Wrong user name and password
Finally, it was found that there was a problem with the MySQL
driver version of the open source project, which was inconsistent with the MySQL
I installed
Solution:
Go to POM.XML
and delete the version information of MySQL
, which can be used by default, as shown below
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
Read More:
- [Solved] init datasource error, url: jdbc:mysql://lcoalhost:3306/test com.mysql.cj.jdbc.exceptions.Com
- [Solved] error {dataSource-1} init error java.sql.SQLException: com.mysql.cj.jdbc.Driver
- [Solved] Druid connection pooling Error: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
- [Solved] Description: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded
- [Solved] dynamic-datasource can not find primary datasource
- Using Mybatis to connect to the database error: Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver···
- [Solved] com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
- [Solved] flask db init Error: KeyError: ‘migrate‘
- Springboot error: “errorcode 1045, state 28000” [How to Solve]
- [Solved] EOS7.6 Error: Init DB failed [Specified key was too long; max key length is 767 bytes…
- [Solved] com.mysql.jdbc.MysqlDataTruncation: Data truncation xxxx
- [Solved] public key is not available client side (option serverRsaPublicKeyFile not set)
- Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 281; The content of element type “sqlMapConfig” is incomplete
- Problems in connecting mysql8.0 in IDEA [How to Solve]
- Error creating bean with name ‘dataSourceScriptDatabaseInitializer‘ defined in class path resource [
- [Solved] Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as
- Mybatis Error: The server time zone value ‘����1532a0’ is unrecognized
- [Solved] C# connecting to MySQL database reports an error
- How to Solve c3p0 connect mysql8.0 Error
- [Solved] Connections could not be acquired from the underlying database