The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Seeit &reply

Posted by subbarao on August 14, 2001 at 2:03 AM

Hi i also got one problem.Here i am giving the details .If u know please send the solution.

When i am connecting to mysqldatabase the following error i am getting.Please see it and give the reply.

server configuration denies access to data source
Please give the reply ASAP.
-----------------------------------------------------------------

> Hi everybody! I from New Delhi - India. I am developing a portal in JSP with backend MySQL. I struck at one one point very seriously. We have downloaded MM.MySQL driver and JRUN. We are trying to configure these two together with MySQL database. Also we are looking for the Code in Java to connect JSP programmes to MySQL database by using MM.MySQL driver. We have followed the following set of instruction as mentioned below:

> <%@ page language="java" %>
> <%@ page import="java.io.*" %>
> <%@ page import="java.sql.*" %>
> <%@ page import="java.util.*" %>
>
> <%
> try
>
> {
>
> try{
> Class.forName("org.gjt.mm.mysql.Driver");
> }
> catch(Exception e)
> {
> out.println(e);
> }
>
> /*Properties P = System.getProperties();
> P.put("jdbc.drivers", "org.gjt.mm.mysql.Driver");
> System.setProperties(P);*/
>
>
> Connection Conn = null;
>
> Conn = DriverManager.getConnection("jdbc:mysql://localhost/dbpaper?user=soumen");
>
> Statement Stmt = Conn.createStatement();
>
> ResultSet rs = Stmt.executeQuery("select * from password");
> while (rs.next())
> {
> out.println(rs.getString("login"));
> }
> }
> catch(Exception e)
> {}

> %>
>
>
> But in this code there is some problem occuring. Pl. tell us the necessary updation. How to cofigure/install MM.MySQL driver.
>
> An earlyresponse will be highly appreciated.With thanks.






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us