Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connecting java(j2se) and mysql

 
Anand Divakaran
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'm trying to connect my java application with mysql running on the same machine. I'm also using Connector/j driver.
However its throwing an SQLException i.e the quoted statement seems to be an error


 
Campbell Ritchie
Sheriff
Pie
Posts: 49447
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I presume you have checked in the MySQL documentation? Most of it looks all right just at a quick glance.

Do you need the port number 3036? Try omitting that. If that doesn't work, please post the stack trace.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
3306 is the default mysql port.
try with this port.

or in case of any error please post the stack trace as Campbell suggested.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49447
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Muhammad Saifuddin:
3306 is the default mysql port.
If that's the problem, it goes to show what a tiny error can mess up the whole application.
[ July 18, 2008: Message edited by: Campbell Ritchie ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic