c3p0 connects to the database and reports an error Access denied for user 'XXX'@'localhost'

report error

When Spring is integrated, use the c3p0 data pool to connect to the database, and it keeps reporting errors

 Project Introduction

Use properties file to save database connection information

 

 Use the c3p0 data pool to connect to the database during spring integration

 The reason for the error is that when spring is integrated, the username variable in the porperties file will be replaced with the username of windows 

Solution

 Change the name of the username variable in properties to something else, such as user

 

0

Guess you like

Origin blog.csdn.net/dajidali_chiji/article/details/132201396