File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Database connectivity problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Database connectivity problem" Watch "Database connectivity problem" New topic

Database connectivity problem

Rajesh k Jha
Ranch Hand

Joined: May 10, 2009
Posts: 72
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

Joined: Dec 20, 2006
Posts: 2565

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

OCUP UML fundamental and ITIL foundation
I agree. Here's the link:
subject: Database connectivity problem
It's not a secret anymore!