----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

I really hate to do this because I'm not sure it's a JServ problem.  I had
posted it on Friday to the mySQL mailing list, and recieved some 'me too'
answers, but nobody had a solution, so I thought I'd try here anyways.

I'm using Apache 1.3.12 with ApacheJserv 1.1.2 and mySQL 3.22.32 running on
localhost.  I can connect via the console with my username 'root' and
password I have set up.  I can connect via PHP4 using the same username and
password, however when trying to connect via Java using the mm.mySQL JDBC
drivers, it won't connect.  Would anybody know what I should be looking at
to correct this?

The code in question is:

        try {
                // The newInstance() call is a work around for some
            // broken Java implementations as noted in mm.mySQL docs
            Class.forName("org.gjt.mm.mysql.Driver").newInstance();
        }
        catch (Exception E) {
                out.println("Unable to load driver.");
                E.printStackTrace();
        }

        try {
                Connection C =
DriverManager.getConnection("jdbc:mysql://localhost/JavaTest?user=root&passw
ord=chablis");
                C.close();
        }
        catch (SQLException E) {
                out.println("SQLException: " + E.getMessage() + "<BR>");
                out.println("SQLState:     " + E.getSQLState() + "<BR>");
                out.println("VendorError:  " + E.getErrorCode() + "<BR>");
        }

Here's what gets printed in the browser:

SQLException: Server configuration denies access to data source
SQLState: 08001
VendorError: 0

In the getConnection() I have tried all sorts of combinations:
Connection C =
DriverManager.getConnection("jdbc:mysql://localhost:3306/JavaTest?user=root&
password=somevalue");
Connection C =
DriverManager.getConnection("jdbc:mysql://localhost/JavaTest", "root",
"somevalue");
Connection C =
DriverManager.getConnection("jdbc:mysql://localhost/JavaTest", "user=root",
"password=somevalue");

Could somebody, anybody help me out with this?

Joseph (Joe) Sheble
a.k.a. Wizaerd
========================================
Wizaerd's Realm
http://www.wizaerd.com
3D Art, ColdFusion, Illustration, Canvas
a little bit of everything...
========================================


--
---------------------------------------------------------------------
Please check "http://www.mysql.com/php/manual.php" before
posting. To request this thread, e-mail [EMAIL PROTECTED]

To unsubscribe, send a message to:
    <[EMAIL PROTECTED]>

If you have a broken mail client that cannot send a message to the above
address(Microsoft Outlook), you can use
http://lists.mysql.com/php/unsubscribe.php



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to