Return-Path: X-Original-To: apmail-incubator-connectors-user-archive@minotaur.apache.org Delivered-To: apmail-incubator-connectors-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AACC2C7D2 for ; Mon, 21 May 2012 09:52:19 +0000 (UTC) Received: (qmail 47399 invoked by uid 500); 21 May 2012 09:52:18 -0000 Delivered-To: apmail-incubator-connectors-user-archive@incubator.apache.org Received: (qmail 47165 invoked by uid 500); 21 May 2012 09:52:14 -0000 Mailing-List: contact connectors-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: connectors-user@incubator.apache.org Delivered-To: mailing list connectors-user@incubator.apache.org Received: (qmail 47129 invoked by uid 99); 21 May 2012 09:52:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2012 09:52:12 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daddywri@gmail.com designates 209.85.217.175 as permitted sender) Received: from [209.85.217.175] (HELO mail-lb0-f175.google.com) (209.85.217.175) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2012 09:52:08 +0000 Received: by lbol5 with SMTP id l5so3436495lbo.6 for ; Mon, 21 May 2012 02:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=F4SjrVjFj4rk/JJMjv3OWUWTTf4GT1yMmXmzVXrY5vI=; b=ciB5c6FV9N1ZV3lawvUTclOe7EjBLrs6m9srqBMXwbeYjeziWRHyvN1ZxNKyI1RDmC LP8uvASami6tdzd54sjnci6kIhb5IWl02e5ij3aV145g0YdZVaO/YDPj0A/6pzEYraA/ +IZ4f/gNIdbTDZ2dDmM4DEi3IOmI7+8JNUb9TSk0bkJKnrMzXzRWPKB4biSaTlm7S8BG w8o9O2mTWLxoGT64N04m0jfAifP+75ORSMaDEx0d/MsH8Q/uM9boQf1rz2DGwaVZnmCx MxwSbWWhEOlNraOClFkcRhyjEicd/NlD4SxbPsGgtyIRLIojplB8tvxHl3nxZFY+0sz4 sMng== MIME-Version: 1.0 Received: by 10.112.103.130 with SMTP id fw2mr8521732lbb.107.1337593906941; Mon, 21 May 2012 02:51:46 -0700 (PDT) Received: by 10.112.94.38 with HTTP; Mon, 21 May 2012 02:51:46 -0700 (PDT) In-Reply-To: References: Date: Mon, 21 May 2012 05:51:46 -0400 Message-ID: Subject: Re: When running on MySQL initialize.sh causes access denied error From: Karl Wright To: connectors-user@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org This sounds like a reasonable fix. Would you be so kind as to create a ticket, and attach your proposed change? Adding a special property for mysql is also reasonable. Karl On Mon, May 21, 2012 at 5:34 AM, Shigeki Kobayashi wrote: > > Hi guys. > > I suppose some pepole use multiple servers to create MCF-MySQL environtme= nt. > Well, I'm one of them but I found that initialize.sh causes access denied > error if DB server is seperated from MCF's. > > Suppose each server's IP are like followings: > > MySQL Server IP: A > MCF Server IP: B > > and properties.xml has the follwing parameters and values: > > =A0 value=3D"org.apache.manifoldcf.core.database.DBInterfaceMySQL"/> > =A0 > =A0 value=3D""/> > =A0 > =A0 > > Then, executing initialize.sh causes the follwing error: > > Caused by: java.sql.SQLException: Access denied for user 'manifoldcf'@'B' > (using password: YES) > =A0 =A0 =A0 =A0 at com.mysql.jdbc.SQLError.createSQLException(SQLError.ja= va:1073) > =A0 =A0 =A0 =A0 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3= 609) > =A0 =A0 =A0 =A0 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3= 541) > =A0 =A0 =A0 =A0 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:9= 43) > =A0 =A0 =A0 =A0 at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4113= ) > =A0 =A0 =A0 =A0 at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1308) > =A0 =A0 =A0 =A0 at > com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2336) > =A0 =A0 =A0 =A0 at > com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2369) > =A0 =A0 =A0 =A0 at > com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153) > =A0 =A0 =A0 =A0 at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.ja= va:792) > =A0 =A0 =A0 =A0 at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.= java:47) > =A0 =A0 =A0 =A0 at sun.reflect.NativeConstructorAccessorImpl.newInstance0= (Native > Method) > =A0 =A0 =A0 =A0 at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAc= cessorImpl.java:39) > > The problem is that MCF requests MySQL to create a new "manifoldcf" user > with localhost access. > In this case, of course, MCF is on the server with IP B, MySQL should cre= ate > a new user with IP Address B. > > The following method is the one creating a new MySQL user in the user > table. > Modifying the part where IP information is added solves this problem. > > > JAR NAME =A0 :mcf-core.jar > PACKAGE =A0 =A0:org.apache.manifoldcf.core.database > CLASS NAME :DBInterfaceMySQL > METHOD NAME: public void createUserAndDatabase > > =A0 =A0 =A0 =A0 =A0 =A0 if(userName !=3D null) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 try > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 list.clear(); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 list.add(userName); > =A0 =A0 =A0 =A0 =A0 =A0 =A0// =A0 =A0 list.add("localhost"); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 list.add(IP_ADDRESS_B); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 list.add(password); > ... > ... > } > > > I guess it would be nice if properties.xml can have a new property taking > MCF server IP to > have MySQL create a "manifoldcf" user with that IP. What do you think? > > > Regards, > > Shigeki > >