Hi,

Have you checked that your database to ensure that security settings allow "remote" 
access?

Gav

-----Original Message-----
From:   Shao [SMTP:[EMAIL PROTECTED]]
Sent:   28 February 2001 09:35
To:     [EMAIL PROTECTED]
Subject:        Re: Help: jdbc for mysql

Thank you for your advise, but it output the same message:
      SQLException: Cannot load connection class 'java.sql.SQLException:
Server configuration denies access to data source'.
      SQLState:     08001
     VendorError:  0


----- Original Message -----
From: "Gavin Siller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 28, 2001 6:23 PM
Subject: Re: Help: jdbc for mysql


> Just to test replcae the appropriate line with the following:
>
>
DriverManager.getConnection("jdbc:mysql://localhost/test?user=monty=greatsql
db");
>
> Cheers ... Gavin
>
> -----Original Message-----
> From:   Shao [SMTP:[EMAIL PROTECTED]]
> Sent:   28 February 2001 09:02
> To:     [EMAIL PROTECTED]
> Subject:        Help: jdbc for mysql
>
> Hi, all
>
> I think this is a very simple question but disturb me deeply. When i run
> these
> codes:
>          import java.sql.*;
>          public class LoadDriver
>          {
>              public static void main(String[] Args)
>              {
>                 try {
>
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
>                     System.out.println("Load OK!");
>                 }
>                 catch (Exception E) {
>                     System.err.println("Unable to load driver.");
>                     E.printStackTrace();
>                 }
>            try {
>                 Connection C = DriverManager.getConnection(
>
> "jdbc:mysql://localhost:3306/mydb?user=mysql&password=");
>             }
>             catch (SQLException E) {
>               System.out.println("Error in connect");
>               System.out.println("SQLException: " + E.getMessage());
>               System.out.println("SQLState:     " + E.getSQLState());
>               System.out.println("VendorError:  " + E.getErrorCode());
>             }
>       }
> it' output likes below:
>     Load OK!
>     Error in connect
>     SQLException: Cannot load connection class 'java.sql.SQLException:
> Server configuration denies access to data source'.
>     SQLState:     08001
>     VendorError:  0
>
> Why cannot load the connection class?
> My environment is: mm.mysql.jdbc-2.0pre5 + mysql-3.23.30-gamma + jdk1.3 +
> redhat6.1 +(tomcat3.2 + apache3.12)
>
>  Please help me
> Thanks
> shao
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to