Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database connectivity problem

 
Rajesh k Jha
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new user to thif forum, Actually i want to use MySql in my JSP program but while connecting the database I am confused with this part "tring url="jdbc:mysql://localhost/books?user=<user>&password=<password>"; here user name and password is required but i dont know how to create user name in MySql, So can anyone tell me how to create a new user in MySql or if there is any default username then what is this, Please help me to solve my query (I m using MySql server 5.0)
 
Jan Cumps
Bartender
Posts: 2596
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rajesk,

Can I suggest you to first learn how to work with JDBC, before you start using it in a JSP?
Here is a good starting point for MySQL users.
The topic is difficult enough, so better start at the begin.
Once you know how to connect and query your MySQL database, you are ready for the next step.
Then, we will be telling you things like " never put JDBC code inside of a JSP"

Regards, Jan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic