JAva連不上Mysql望高手好人幫忙一下
有人嗎?為什么我的連不上啊。要怎么弄啊。報一大串錯誤……有人會弄嗎?連不上我沒法測試啊。練習的機會都沒有啊。 怎么么弄啊報錯說是什么SSL,我到網上下了SSL.服務也開了都不行。有會的好心人嗎?能加Q解答一下嗎?或在這里留言也可以??!先謝謝了。我的Q454939592求好心人幫幫忙。自己實在弄不好。
以下是錯誤代碼:
Tue May 31 11:04:27 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.sql.SQLException: Column 't_id' not found.
?at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:963)
?at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896)
?at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885)
?at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
?at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1077)
?at com.mysql.jdbc.ResultSetImpl.getInt(ResultSetImpl.java:2583)
?at com.lins.JDBCgoddess.main(JDBCgoddess.java:27)
2016-05-31
解決了~!上網找了好久!如果是按老師說的URL不行,如果有出現上面的情況的。把URL改一下就行了
URL="jdbc:mysql://localhost:3306/db?useUnicode=true&characterEncoding=utf-8&useSSL=false";
有這樣的問題的這樣改就連得上了;