This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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
Posts: 48445
56
  • 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
Posts: 48445
56
  • 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