连接mysql数据库,mysql版本不同jdbc连接问题
8.0以上 Connection con=DriverManager.getConnection(“jdbc:mysql://localhost:3306/数据库名?useSSL=false&&allowPublicKeyRetrieval=true&serverTimezone=“UTC”,“用户名”,“密码”)8.0以下只用写到数据库名。
·
8.0以上 Connection con=DriverManager.getConnection(“jdbc:mysql://localhost:3306/数据库名?useSSL=false&&allowPublicKeyRetrieval=true&serverTimezone=“UTC”,“用户名”,“密码”)
8.0以下只用写到数据库名
更多推荐
已为社区贡献1条内容
所有评论(0)