2004-12-30 00:32:13 Solve the problem of connecting the mysql database =================================== ==== Question in 9CBS is http://community.9cbs.net/expert/topic/3687/3687107.xml?temp =.803097
Why is the password of MySQL root users to be empty, after setting the password, is wrong? The error message is as follows: java.sql.sqlexception: Communication Failure During handshake. Is the a Server Running on localhost: 3306? At Org.gjt.mm.mysql.mysqlio.init (mysqlio.java: 327) at Org.gjt.mm .mysql.connection.connectioninit (connection.java: 261) at Org.gjt.mm.mysql.jdbc2.connection.connectioninit (connection.java: 89) at Org.gjt.mm.mysql.driver.connect (driver.java : 167) At java.sql.driverManager.getConnection (drivermanager.java: 523)
-------------------------- I am the environment: WinXP Home, Eclipse3.0, MySQL-5.0.0-alpha, mm.mysql- 2.0.4-bin.jar, J2SDK1.5 ======================================== ==================== Solution The mm.mysql-2.0.4-bin.jar is replaced with mysql-connector-java-3.1.5-gamma-bin. JAR download address http://dev.mysql.com/get/downloads/connector-j/mysql-connector-java-3.1.5-gamma.zip/from/http://mirrors.hpcf.upr.edu/mysql / Just ============================================== === Remove the problem: MySQL is not a password by default. For security, I set the password, then use mm.mysql-2.0.4-bin.jar, it is not connected, there is no way, then clear the password to use it. This is not good, because the work is relatively busy, it will stand up.