• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot connect to MySQL5 with connector-java

 
Gergo Csaki
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does anyone have an idea, why can't I connect to MySQL5 with neither mysql-connctor-java 3.12.x, nor mysql-connector-java 5.x (dev version)?

I can connect to MySQL4.1.11 using any of the drivers, but when I try to connect to a MySQL5 db using the same code and syntax, it fails:
"STACKTRACE:
java.net.SocketException: java.net.ConnectException: Connection refused"

The MySQL log is empty. MySQL server listens on the standard 3306 port. I'm using Linux boxes running jre1.5.0_06-b05. Access righs, passwords, etc are OK, servers are runnig , no firewalls in the way, I can connect to them with other non-java clients.

What am I doing wrong?

Regards,
Brian
 
fred Joly
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it's a new installation, you should look in the "my.cnf" file
(/etc/mysql/my.cnf on my computer but it might be somewhere else)
The line wich says "skip-networking" should be commented (#skip-networking) in order for jbdc to work.
 
Gergo Csaki
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it's not a new installation.
Other clients can connect using both tcpip and socket (localhost or 127.0.0.1) so this shouldn't be the problem :-(
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic