JAva連不上Mysql望高手好人幫忙一下
有人嗎?為什么我的連不上啊。要怎么弄啊。報(bào)一大串錯(cuò)誤……有人會(huì)弄嗎?連不上我沒(méi)法測(cè)試啊。練習(xí)的機(jī)會(huì)都沒(méi)有啊。 怎么么弄啊報(bào)錯(cuò)說(shuō)是什么SSL,我到網(wǎng)上下了SSL.服務(wù)也開了都不行。有會(huì)的好心人嗎?能加Q解答一下嗎?或在這里留言也可以?。∠戎x謝了。我的Q454939592求好心人幫幫忙。自己實(shí)在弄不好。
以下是錯(cuò)誤代碼:
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
解決了~!上網(wǎng)找了好久!如果是按老師說(shuō)的URL不行,如果有出現(xiàn)上面的情況的。把URL改一下就行了
URL="jdbc:mysql://localhost:3306/db?useUnicode=true&characterEncoding=utf-8&useSSL=false";
有這樣的問(wèn)題的這樣改就連得上了;