Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jul 2004 03:39:04 +0100
From:      Antony T Curtis <antony.t.curtis@ntlworld.com>
To:        Mohammad Reza <reza@mra.co.id>
Cc:        java@freebsd.org
Subject:   Re: Could'nt connect to mysql
Message-ID:  <1089686344.922.8.camel@pcgem.rdg.cyberkinetica.com>
In-Reply-To: <D9E6E4026B15A14BAF6DDBF1E74F492401236AEA@exchange.mra-holding.net>
References:   <D9E6E4026B15A14BAF6DDBF1E74F492401236AEA@exchange.mra-holding.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2004-07-12 at 09:53, Mohammad Reza wrote:
> Dear List;
>  
> I have problem to connect to mySQL database via my jsp script.
> Here is the error ;
>  
> 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"
>  
> please help me
>  
> 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.* 
	TO "username@localhost.mra.co.id" 
	IDENTIFIED BY PASSWORD "mysecret";

Perhaps using the MySQL command line tool.

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

-- 
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?1089686344.922.8.camel>