Accessibility

TechNote (Archived)

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.

  1. Download a current, stable version of the MySQL Connector/J JDBC driver, available at: http://dev.mysql.com/downloads/.
  2. Extract the mysql-connector-java-3.{n}-bin.jar file from the downloaded archive file.
  3. Save the mysql-connector-java-3.{n}-bin.jar file in theJRun-home/servers/lib directory.
  4. Restart the JRun server.
  5. Add a new data source to the JRun administrator, using the driver option Not-Listed.
  6. Enter the Driver Class:

    com.mysql.jdbc.Driver
  7. Enter the URL:

    jdbc:mysql://[host]:[port]/[database]
  8. Complete the username/password and adjust other data source settings, if needed.
  9. Restart the JRun server.
  10. Verify the data source from the JRun administrator.

AlertThis 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!

Get Adobe Flash Player

Creative Commons License

Search Support

Document Details

ID:5fa26cba
Database:MySQL

Products Affected:

jrun