SSM starts to connect to the database and reports an error

  java.sql.SQLException: Access denied for user 'root  '@'localhost' (using password: YES)

 

A question that has been bothering me for a long time. It is also a variety of Baidu, various investigations. Finally came to a conclusion. It turns out that there are spaces after the username and password configured in the configuration file. Really satisfied.

The configuration file is as follows.

jdbc_driverClassName = com.mysql.jdbc.Driver 
jdbc_url = jdbc:mysql://127.0.0.1:3306/testbase?useUnicode=true&characterEncoding=utf8
jdbc_username = root
jdbc_password = 123456

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326070624&siteId=291194637