Re: Connector/J "Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost."
Posted by: Mark Matthews
Date: October 30, 2007 04:05PM

Sam Atkinson Wrote:
-------------------------------------------------------
> I've been trying for a day and a half to get this
> working with no luck. I'm running Java 6/mysql 5/
> mandriva 2008 / eclipse/ connectorJ 5.0.8, and
> have tried using hibernate and connecting manually
> with no luck. I've tried reinstalling mysql and
> different versions of java and connector j, and it
> changes the output slightly, but with the same
> CommunicationsException followed by Connection
> failure.

[snip]
> String url =
> "jdbc:mysql://127.0.0.1:2273/PADPAL";

Sam,

Are you *sure* that your database is running on port 2273? That's a pretty non-standard port for MySQL to be running on, the default is 3306 (and the driver would use *that* if it's not specified). My guess is that there's some other server (not MySQL) listening there, and of course the driver gets confused.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
Re: Connector/J "Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost."
October 30, 2007 04:05PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.