admin管理员组

文章数量:1550649

项目场景:连接数据库,然后向数据库中插入一条语句

问题描述:出现如下的错误

ug 23 16:05:55 CST 2020 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

解决方法:在后面加入jdbc:mysql://localhost:3306/user?useSSL=false

原因分析:

解决方案:经过分析发现是这个连接于具有问题String sql = “insert into student(name,age) values(’”+stu.getName()+"’,’"+stu.getAge()+"’)";

用这个的话,就要用st.execute(sql);来执行这条语句

本文标签: 错误发生IssuemanipulationData