myeclipse servlet jdbc直连数据库遇到的一些小问题
The server time zone value '?й???????' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
解决方案:在jdbc连接的url后面加上serverTimezone=GMT即可解决问题,如果需要使用gmt+8时区,需要写成GMT%2B8,否则会被解析为空
url = "jdbc:mysql://localhost:3306/stu?serverTimezone=GMT%2B8";
/stu表示的是选择哪个数据库
注册驱动失败
应该将jar包放到 web-inf 下的 lib 文件夹中
本文来自博客园,作者:correct,转载请注明原文链接:https://www.cnblogs.com/correct/p/12862011.html

浙公网安备 33010602011771号