Could'nt connect to mysql

Mohammad Reza reza at mra.co.id
Mon Jul 12 20:51:04 PDT 2004


Thanks, now I can connect to mySQL, 

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

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 at 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 at ntlworld.com>



More information about the freebsd-java mailing list