今天用mm.MySQL-2.0.4-bin.jar連接mysql,報(bào)錯(cuò)如下:
Communication failure during handshake. Is there a server running on localhost:3306?
我的Mysql數(shù)據(jù)庫(kù)的版本:5.0.18。使用mm.mysql-2.0.4-bin.jar,。出現(xiàn)了上面的問(wèn)題。mysql服務(wù)是開(kāi)的,有可能是驅(qū)動(dòng)不行了,上mysql下載了個(gè)對(duì)應(yīng)5.0的版本:mysql-connector-java-5.0.8-bin.jar ,再連接,ok,沒(méi)有出錯(cuò)。
drivers=org.gjt.mm.mysql.Driver poolapp.url=jdbc:mysql://localhost/test?user=root&passWord=ffcsoss&useUnicode=true&characterEncoding=8859_1
ysql網(wǎng)站上的說(shuō)明:
MySQL Connector/J is a JDBC Type 4 driver. Different versions are available that are compatible with the JDBC-3.0 and JDBC-4.0 specifications. The Type 4 designation means that the driver is pure-Java implementation of the MySQL PRotocol and does not rely on the MySQL client libraries.
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注