Re: Connector/J Changes localhost in connectstring to remote host name
Posted by: Mark Matthews
Date: September 09, 2005 07:42AM

Lukasz Palys wrote:
> Lukasz Palys wrote:
> > Hallo Mark,
> >
> > thank you for the fast reply.
> > If i correctly understood, it means that my
> > webapplication is running on a diffrent host
> than
> > the mysql database.
> > It also means that i cannot conect to the
> database
> > until the provider grant me to do so.
> > But my provider says it's my applications
> error
> > and therefor my problem.
> > What should i do in such a case?
> >
> > Thanks
>
> Hallo,
>
> I,ve got an reply from my provider and it says
> that mysql and tomcat runs on the same host.
> Than it has to be a problem with the driver or am
> i getting something wrong here?
>
> Thanks
> L.P.

L.P.

No, it is not a problem from the driver. You need to add grants to the database, see

http://dev.mysql.com/doc/mysql/en/cj-faq.html

Basically, you need to add the following grant

GRANT ... (look in the manual for the grants you want, I'm not going to post them here, because that's a long discussion, and you need to read the manual to understand what's going on, otherwise you create security issues) ON server.* TO 'manteufel'@'plesk3.ms.de.cdip.net' IDENTIFIED BY 'pass'

(btw, are you sure your database is named "server"?)

If your hosting provider gives you access to both Tomcat and MySQL and doesn't know how to make them work together, I might suggest finding one that can, as there are quite a few, where this works "out-of-the-box".

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.