Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jsp connection with mysql

843835Oct 5 2002 — edited Oct 5 2002
I have hosted a site on a hosting server and it is providing jsp support. They are providing mysql as a database. The problem I am having is with the connection to the mysql database from the jsp page. I am using the following code for connection.

<% Class.forName("org.gjt.mm.mysql.Driver");
Connection dbCon = DriverManager.getConnection("jdbc:mysql:localhost/my_db_name?user=Username&password=Pass"); %>

/*I am using my databse's original name in place of my_db_name and I am obviously using my database's username and password in place of Username and Pass */

When I am running this code, I am getting the following exception.

java.sql.SQLException: Server configuration denies access to data source

Somebody please help me that what is the problem here and please do it quick because I am running out of time. One more think that if there is some information which i need to ask the hosting service provider then please do menntionthat also. I would be thankful.

You can email me at : adil_ahmed79@yahoo.com
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2002
Added on Oct 5 2002
2 comments
86 views