脚本宝典收集整理的这篇文章主要介绍了mac下安装JAVA开发工具(7)------mysql8.0.11链接采坑,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
MySQL8.0.11链接采坑
安装mySQL8.0.11出现各种链接问题
1.准备工具
1.1 更新jar包到最新版本
-
c3p0-0.9.5.2.jar
c3p0 -
mchange-commons-java-0.2.11.jar
c3p0连接池辅助包 c3p0-0.9.2版本后分离出来的包,0.9.1的时候还是只是一个包。 commons-beanutils-1.9.3.jar
commons-dbutils-1.7.jar
-
commons-LOGging-1.2.jar
日志 jstl-1.1.2.jar
standard-1.1.2.jar
-
mysql-connector-java-8.0.11.jar
mysql最新驱动
2.mysql的安装注意事项
在安装mysql的时候 要勾选兼容5版本的密码加密规则 否则mysql账户的密码会用新的加密方式加密
- 之前密码加密的方式是
mysql_native_password
在新版本中加密方式改为caching_sha2_password
-
如果安装时没有选择兼容模式 补救办法如下
# 用 mysql_native_password 加密方式更新 root 用户密码 alter mysql.user 'root'@'localhost' identified wITh mysql_native_password by '你的密码'; # 刷新 flush PRivileges;
3.c3p0配置项
<c3p0-config> <default-config> <property name="driverClass">com.mysql.cj.jdbc.Driver</property> <property name="jdbcUrl">jdbc:mysql://localhost:3306/day13_db?useSSL=false&serverTimezone=Asia/Shanghai&characterEncoding=utf-8&autoReconnect=true&allowPublicKeyRetrieval=true</property> <property name="user">root</property> <property name="password">12345678</property> </default-config> </c3p0-config>
以上是脚本宝典为你收集整理的mac下安装JAVA开发工具(7)------mysql8.0.11链接采坑全部内容,希望文章能够帮你解决mac下安装JAVA开发工具(7)------mysql8.0.11链接采坑所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。