• Post Reply Bookmark Topic Watch Topic
  • New Topic

Connect servlet to MySQL using NetBeans IDE 4.1

 
Maria Mina
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I am coding a connection and is not connecting.

Here is my coding:

'lmupums' is my db name
'lmupums' is the username and 'DWA' is the password
Where is my error? Can you please help me?
 
sai prasanna
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i dont know about the current driver you are using
but try with this code

Class.forName("org.gjt.mm.mysql.Driver");

Connection con = DriverManager.getConnection("jdbc:mysql://localhost/lmpumps?user=lmpumps");

regards
saiprasanna
 
aditya seth
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what errors u r getting?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aditya,

Please see:
http://faq.javaranch.com/view?UseRealWords

You are correct though.
We would need to see the error message in order to be of more assistance.

Maria,
Is this a even servlet app?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!