IDEA连接数据库失败@localhost failed. [08001] Could not create connection to database server. Attempte

##关于IDEA连接mysql数据库失败
Connection to [email protected] failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.
IDEA连接数据库失败@localhost failed. [08001] Could not create connection to database server. Attempte
我的这个错误的原因是URL后面缺少后缀
这个错误我的解决方法是在URL后面增加后缀:

?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC

错误解决:
IDEA连接数据库失败@localhost failed. [08001] Could not create connection to database server. Attempte
后续:我在上网查看此问题的时候发现缺少后缀不是唯一出现这个错误的原因,如果加后缀后也不能解决此问题,请继续尝试其他方法,比如更换驱动(参考链接:https://www.cnblogs.com/xiaobai1202/p/10904371.html )、更新驱动和jar包(参考链接 https://blog.csdn.net/yiye2017zhangmu/article/details/93622976 )等等
加入群聊一起学习:
IDEA连接数据库失败@localhost failed. [08001] Could not create connection to database server. Attempte