Could'nt connect to mysql
Antony T Curtis
antony.t.curtis at ntlworld.com
Mon Jul 12 20:08:52 PDT 2004
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