From owner-freebsd-java@FreeBSD.ORG Tue Jul 13 03:51:04 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7ACD616A4CE for ; Tue, 13 Jul 2004 03:51:04 +0000 (GMT) Received: from mx3.mra.co.id (mx3.mra.co.id [202.138.254.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFDFE43D1F for ; Tue, 13 Jul 2004 03:50:57 +0000 (GMT) (envelope-from reza@mra.co.id) Received: from localhost (unknown [127.0.0.1]) by mx3.mra.co.id (Postfix) with ESMTP id 56A942E05E for ; Tue, 13 Jul 2004 10:34:06 +0700 (WIT) Received: from mx3.mra.co.id ([127.0.0.1]) by localhost (mx3.mra.co.id [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 70229-27 for ; Tue, 13 Jul 2004 10:32:51 +0700 (WIT) Received: from mail.mra.co.id (unknown [172.16.0.25]) by mx3.mra.co.id (Postfix) with ESMTP id 63BBF2E093 for ; Tue, 13 Jul 2004 10:32:35 +0700 (WIT) content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Date: Tue, 13 Jul 2004 10:13:02 +0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Could'nt connect to mysql Thread-Index: AcRohkzx7/wcrdH7S7yWm3izYnS/DgAARjiA From: "Mohammad Reza" To: "Antony T Curtis" X-Virus-Scanned: by amavisd-new at mra.co.id cc: java@freebsd.org Subject: RE: Could'nt connect to mysql X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2004 03:51:04 -0000 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