[Solved] ERROR com.alibaba.druid.pool.DruidDataSource – init datasource error, url jdbcmysql

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: