Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jul 2004 10:13:02 +0700
From:      "Mohammad Reza" <reza@mra.co.id>
To:        "Antony T Curtis" <antony.t.curtis@ntlworld.com>
Cc:        java@freebsd.org
Subject:   RE: Could'nt connect to mysql
Message-ID:  <D9E6E4026B15A14BAF6DDBF1E74F492401236AEC@exchange.mra-holding.net>

next in thread | raw e-mail | index | archive | help
Thanks, now I can connect to mySQL,=20

Regards
reza
-----Original Message-----
From: Antony T Curtis [mailto:antony.t.curtis@ntlworld.com]=20
Sent: Tuesday, July 13, 2004 9:39 AM
To: Mohammad Reza
Cc: java@freebsd.org
Subject: Re: Could'nt connect to mysql

On Mon, 2004-07-12 at 09:53, Mohammad Reza wrote:
> Dear List;
> =20
> I have problem to connect to mySQL database via my jsp script.
> Here is the error ;
> =20
> javax.servlet.ServletException: Data source rejected establishment of
> connection,  message from server: "Host 'localhost.mra.co.id' is not
> allowed to connect to this MySQL server"
> =20
> please help me
> =20
> regards
> reza

This is a privileges issue with the MySQL server. You should read up on
the GRANT and REVOKE syntax - the documentation is available online at
http://www.mysql.com/doc/

So you would issue to MySQL the command:

GRANT SELECT ON mydb.*=20
	TO "username@localhost.mra.co.id"=20
	IDENTIFIED BY PASSWORD "mysecret";

Perhaps using the MySQL command line tool.

http://dev.mysql.com/doc/mysql/en/GRANT.html

--=20
Antony T Curtis <antony.t.curtis@ntlworld.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D9E6E4026B15A14BAF6DDBF1E74F492401236AEC>