List:General Discussion« Previous MessageNext Message »
From:Frank LaLone Date:November 2 2002 11:40am
Subject:Re: Help With Myqsl/jdbc/RedHat
View as plain text  
Actually, I did see the Read Me file that came with the driver.  I spent so
much time on this myself, I wanted to start fresh on here. :)

I am still unable to get mysql to connect to the jdbc driver.  Here is the
latest what I did and the resulting errors that came up:

#######################################################################

GRANT ALL ON *.* TO user1@stripped IDENTIFIED BY 'password';


SQLException: Invalid authorization specification: Access denied for user:
'user1@stripped' (Using password: YES)
SQLState: 28000
VendorError: 1045



GRANT ALL ON *.* TO user2@stripped IDENTIFIED BY 'password';


SQLException: Invalid authorization specification: Access denied for user:
'user2@stripped' (Using password: YES)
SQLState: 28000
VendorError: 1045

##############################################

I must point out, mysql will connect using these parameters from the command
line.

Mark, can you or anyone on here see what I am doing wrong? I am really in a
bind here,  I am way late on a deadline.  Prior to this, I have never had a
problem with mysql and connections to it from web pages/apps using java.

I would really appreciate any help,  has anyone else on here got
mysql/jdbc/Red Hat 7.3 to get mysql to connect from there web apps/pages
using java?  Did you do anything different from what I did?

Thank You very much for your help.

Frank Lalone


> Frank LaLone wrote:
> 
>> I am having a nightmare of a time getting Red Hat 7.3 to connect to Mysql
>>  using the jdbc    with jakarta-tomcat-4.1.12.
>> 
>> I had to switch to a new dedicated service that went from Red Hat 7.2  to
>> Red Hat 7.3 .  Everything else is the exact same version of Java, Tomcat,
>> and the jdbc connector.
>> 
>> I can not get a connection, every time I try, I keep getting this message:
>> 
>> SQLException: Server configuration denies access to data source
>> SQLState: 08001
>> VendorError: 0
>> 
>> 
>> Example:
>> http://www.wprs.org/examples/gateway/test.jsp?sessionID=LLLL
>> 
>> I wont' even connect with my super user.  I am totally stumped. I have to
>> get this up and running,  can anyone help me with this?  I would really
>> appreciate any input.
>> 
>> Thank You Very Much
>> Frank LaLone
> 
> 
> I believe this issue is covered in the README that comes with the
> driver, but I'll summarize here, as RedHat is always a pain with respect
> to this, as they do have a somewhat 'broken' default install.
> 
> If your application is on the same server as your database, you're most
> likely running into the problem that RedHat maps the IP address
> 127.0.0.1 to 'localhost.localdomain', not 'localhost' as every other
> Unix does :(, which means you will need to add grants for connections
> from 'localhost.localdomain'.
> 
> Even if you do not connect to localhost, but some other IP address, you
> need to add grants to your database to allow connections from the IP
> address that your Java application runs on to the database you are
> trying to connect to.
> 
> For example (and use this only as an example, you need to read the
> grants section in the MySQL manual to make sure you are creating grants
> that have the appropriate level of security for your application), to
> add full grants for the user 'mark' connecting from 'foo.bar.com' to the
> database 'redhat' using the password 'greatsqldb', you would issue the
> following at the MySQL command prompt (logged in as the 'root' user or
> someone else who has grant privileges):
> 
> mysql> GRANT ALL PRIVILEGES ON redhat.* to 'mark'@'foo.bar.com'
> IDENTIFIED BY 'greatsqldb';
> 
> -Mark
> 

Thread
ReplicationAlexander Burbello31 Oct
  • Re: ReplicationJeremy Zawodny1 Nov
Re: ReplicationAlexander Burbello1 Nov
  • Help With Myqsl/jdbc/RedHatFrank LaLone2 Nov
    • Re: Help With Myqsl/jdbc/RedHatMark Matthews2 Nov
      • Re: Help With Myqsl/jdbc/RedHatFrank LaLone2 Nov
        • Re: Help With Myqsl/jdbc/RedHatMark Matthews2 Nov
  • re: Re: ReplicationEgor Egorov2 Nov