List:General Discussion« Previous MessageNext Message »
From:David Halsted Date:September 15 2000 10:42am
Subject:Re: Problem connecting to db in MySql from Java code
View as plain text  
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.
>
>

Thread
How to switch users.Srini Bhamidipaty9 Apr
  • Re: Problem connecting to db in MySql from Java codeDavid Halsted15 Sep
Re: How to switch users.Fred Lindberg9 Apr
  • RE: How to switch users.Srini Bhamidipaty9 Apr
RE: How to switch users.Fred Lindberg9 Apr
  • Creating a SQL script to generate tables.Srini Bhamidipaty9 Apr
    • RE: Creating a SQL script to generate tables.Jay Miller9 Apr
      • RE: Creating a SQL script to generate tables.Srini Bhamidipaty9 Apr
        • Re: Creating a SQL script to generate tables.Thimble Smith9 Apr
Re: Creating a SQL script to generate tables.Fred Lindberg9 Apr
  • FAQ vs Manual (was: Re: Creating a SQL script...)S. Whitmore10 Apr
Re: FAQ vs Manual (was: Re: Creating a SQL script...)Fred Lindberg10 Apr
  • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Ed Carp11 Apr
  • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Michael Widenius11 Apr
    • Re: FAQ vs ManualPeter F. Brown11 Apr
      • Re: FAQ vs Manualjonathan michaels11 Apr
  • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Ed Carp11 Apr
  • Re: FAQ vs Manual (was: Re: Creating a SQL script...)kalle volkov11 Apr
    • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Steve Edberg11 Apr
      • Re: FAQ vs ManualPaul DuBois11 Apr
        • Re: FAQ vs ManualIsabelle Poueriet18 Apr
  • Re: FAQ vs ManualEd Carp11 Apr
    • Re: FAQ vs ManualPaul DuBois11 Apr
    • Re: FAQ vs Manualjonathan michaels12 Apr
      • Re: FAQ vs ManualPaul DuBois12 Apr
  • Re: FAQ vs ManualEd Carp11 Apr
  • Re: FAQ vs ManualEd Carp12 Apr
    • Re: FAQ vs ManualIsabelle Poueriet18 Apr
  • Re: FAQ vs ManualFred Read12 Apr
    • Re: FAQ vs Manualjonathan michaels13 Apr
  • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Fred Read12 Apr
    • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Isabelle Poueriet18 Apr
  • Re: FAQ vs ManualRichard Reina13 Apr
  • Re: FAQ vs ManualFred Read13 Apr
  • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Ed Carp13 Apr
    • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Vivek Khera14 Apr
  • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Fred Read13 Apr
    • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Micheal Mc Evoy13 Apr
  • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Ed Carp13 Apr
  • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Ed Carp14 Apr
    • Re: FAQ vs Manual (was: Re: Creating a SQL script...)jonathan michaels15 Apr
      • Re: FAQ vs Manual (was: Re: Creating a SQL script...)Darrell Shifflett15 Apr
Re: FAQ vs Manual (was: Re: Creating a SQL script...)Fred Lindberg12 Apr
  • More about my FAQ...S. Whitmore13 Apr
    • Re: More about my FAQ...Fred Read13 Apr
    • Re: More about my FAQ...Ed Carp13 Apr
Re: FAQ vs Manualluuk13 Apr