关于数据库连接不上的问题,急
1.我的数据库版本是8.0.19.已经导入了相应的jar包,并使用build path将5.0.4的jar包更改为8.0.19的jar包并应用
2.在c3p0-config文件中的配置是:
<?xml version="1.0" encoding="UTF-8"?>
<c3p0-config>
<default-config>
<property name="driverClass">com.mysql.cj.jdbc.Driver</property>
<property name="jdbcUrl">jdbc:mysql:///shop?characterEncoding=utf-8&serverTimezone=UTC</property>
<property name="user">root</property>
<property name="password">root</property>
</default-config>
</c3p0-config>
3.同时,工具类里面的UploadUtils.java报错,不知道如何更改。
报错信息是:The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files
4.在登录界面输入用户名密码后,控制台输出报错信息为:
警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@63b739a8 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client
正在回答 回答被采纳积分+1
- 参与学习 人
- 提交作业 357 份
- 解答问题 8016 个
本阶段将带你学习MySQL数据库,JDBC接口,MyBatis框架等,带你掌握的数据的存放和管理。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星