Gee, this one is familiar, as I just went through it myself with almost
exactly the same configuration, although I was using Tomcat . . .
From the command line, try doing
mysql -h localhost -u user -p
I was able to sign on without using the -h option, but when I tried the -h
option I got an error. To fix this, I had to update the user table in the
mysql database so that the IP address of the machine was in the 'host'
column; then I granted appropriate privileges to the user following the
MySQL manual. The problem was that MySQL thought it was being hit from a
host for which it had no access privileges and this is why it was refusing
connections. Once I was able to make command-line connections with the -h
option, I was able to connect via the mm.mysql driver as well.
Hope this helps,
Dave Halsted
----- Original Message -----
From: Vikram <vikramb@stripped>
To: <java@stripped>; <mysql@stripped>
Sent: Friday, September 15, 2000 6:53 AM
Subject: Problem connecting to db in MySql from Java code
> Hi,
> I am not able to connect to db in MySql from Java code
>
> MySql Version: 3.22.22
> JDBC Driver: mm.mysql-2.0.2
> Webserver: Apache 1.3
> JSP Server: JRun 3.0
> OS: Linux RedHat 6.1
>
> I have set priviliges in the user,db,host tables
> I have set the classpath of the JDBC Driver also
>
> I have tested with the latest available drivers
>
> getting the SQL Exception: "Server Configuration denies access to
> datasource"
>
> Would anybody help?
>
> Thanks,
> Vikram
>
>
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail java-thread1586@stripped
>
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail java-unsubscribe@stripped instead.
>
>