Configuring MySQL 4.1 with JRun 4 using the Connector/J driver
Issue
When configuring a data source to MySQL 4.1 using the MySQL driver provided by Macromedia JRun 4, the following error may occur:
SQLException while attempting to connect: java.sql.SQLException: Communication failure during handshake. Is there a server running on 127.0.0.1:3306?
java.sql.SQLException: Communication failure during handshake. Is there a server running on 127.0.0.1:3306?
Reason
The MySQL 4.1 database authentication mechanism has changed since earlier versions, and earlier MySQL JDBC drivers will not work unless either MySQL is configured to use the former authentication mechanism or a current version of the driver is used instead.
Solution
To fix the error, use the MySql Connector/J driver to configure the data source with MySQL 4.1. Follow the instructions below to configure the data source using the Connector/J driver.
- Download a current, stable version of the MySQL Connector/J JDBC driver, available at: http://dev.mysql.com/downloads/.
- Extract the mysql-connector-java-3.{n}-bin.jar file from the downloaded archive file.
- Save the mysql-connector-java-3.{n}-bin.jar file in theJRun-home/servers/lib directory.
- Restart the JRun server.
- Add a new data source to the JRun administrator, using the driver option
Not-Listed. - Enter the Driver Class:
com.mysql.jdbc.Driver - Enter the URL:
jdbc:mysql://[host]:[port]/[database] - Complete the username/password and adjust other data source settings, if needed.
- Restart the JRun server.
- Verify the data source from the JRun administrator.
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
