Mysql-JDBC connection Error

Mysql-JDBC connection Error

Post by 3aμe? » Tue, 11 Jul 2000 04:00:00



Environment :
Linux, Apache, Jserv, GNUjsp, Mysql, jdk1.2.2
----------------------------------------------------------
Message :

Driver loaded!!!!
java.sql.SQLException: Cannot load connection class 'java.sql.SQLException:
Server configuration denies access to data source

----------------------------------------------------------
Source :


<%
        String url = "jdbc:mysql://myip:3306/mydb";
        // myip is realip...in my program. mydb is database name

        String username = "myid";
        String password = "myid123";

        try
        {
                Class.forName("org.gjt.mm.mysql.Driver").newInstance();

                out.println("Driver loaded!!!!<br><br>");
        }
        catch(Exception e)
        {
                System.out.println(e);
        }

        try
        {
                 Connection con=
DriverManager.getConnection(url,username,password);

                out.println("Connection established!");
        }
        catch(Exception e)

                out.println(e);
        }
----------------------------------------------------------

I need fast answer.. thanks.
%>