再往数据库中添加数据时,起初可以添加进去,之后不知道是把电脑关了还是怎么老报错,而且添加不进去了

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 app

网络没有连接,或是mysql没有登录!
**Establishing SSL connection without server's identity verification **
requirements SSL connection must be established by default

谢谢哈 但是同时经常报preparedstatement的异常是怎么回事呢 每次执行报错都不一样 数据库应该是连接上了 Fri Apr 22 17:36:56 CST 2016 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.
Exception in thread "main" java.lang.NullPointerException
at com.imooc.dao.GoddessDao.addGoddess(GoddessDao.java:21)
at com.imooc.action.GoddessAction.main(GoddessAction.java:27)

http://stackoverflow.com/questions/36756739/how-to-disable-warn-when-connecting-to-sql-database-in-java

Maybe It will help you !

example1:
**Do what it says and add useSSL=false to the connection string.?

Yupp just figured that out... Thanks though. [+]/ – Ethan Moore yesterday

**example2:

Try to use the useSSL=false in the connection string

Example:

jdbc:mysql://xxxxxxx:3306/xxxx?autoReconnect=true&useSSL=false;