在项目中mysql数据库访问不到,报错如下,求解决
我在配置文件里面配置好了,但是就是访问不到,先是配置文件的一部分:
<parameter ID="JDBC_DRIVER">
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter ID="JDBC_URL">
<value>jdbc:mysql://localhost:3306/eap? autoReconnect=true&useUnicode=true&characterEncoding=gbk</value>
</parameter>
<parameter ID="JDBC_USER">
<value>root</value>
</parameter>
<parameter ID="JDBC_PWD">
<value>111111</value>
</parameter>
会报如下错误:
Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)'.