Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 98342 invoked from network); 22 May 2003 15:07:01 -0000 Received: from relay1.tiscali.de (HELO webmail.tiscali.de) (62.27.55.1) by daedalus.apache.org with SMTP; 22 May 2003 15:07:01 -0000 Received: from DJ0X820J (80.128.233.59) by webmail.tiscali.de (6.7.008) id 3ECCA5C600027313 for user@ant.apache.org; Thu, 22 May 2003 16:49:51 +0200 Message-ID: <040601c32073$dedf2640$030200c0@DJ0X820J> From: "Antoine Levy-Lambert" To: "Ant Users List" References: <20030522131928.18441.qmail@web20206.mail.yahoo.com> Subject: Re: perplexing exec mysql problem Date: Thu, 22 May 2003 17:07:32 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I do not know mysql; maybe with mysqladmin you can create your first user and password ? Antoine ----- Original Message ----- From: "M Damon Hill" To: "Ant Users List" Sent: Thursday, May 22, 2003 3:19 PM Subject: Re: perplexing exec mysql problem > Antoine-- > > Thanks for the tips. I am now using the task however, a little problem with that particular task and maybe it is rooted in my very little experience with databases in general. However, here is the situation. > > I am able to successfully create the new database with the 'mysqladmin' command line tool using the create command. However, that simply creates an "empty" database. Now the sql scripts that I am wanting to execute on the newly created database, contain all of the information to "populate" this database with tables, values, users, and what not. Now, the problem with that as you can probably guess is, when I execute the the script on the database and it wants a userid and pass, well I don't have one yet, because the database is clean and prestine. > > Are that any suggestions as to a way around this issue? > > Thanks for all the help. > > ~damon > > Antoine Levy-Lambert wrote: > 2 tips : > - use ant 1.6alpha (nightly builds) . ant 1.6 has an input attribute for > exec, indicating a file from which standard input is taken, > - even better : try to use the task instead of the task to > run your DDL or DML scripts. > can connect directly to the database (through JDBC driver) and > execute whatever SQL statements you want. > Antoine > ----- Original Message ----- > From: "M Damon Hill" > To: > Sent: Wednesday, May 21, 2003 10:02 PM > Subject: perplexing exec mysql problem > > > > good day... > > > > I have been working on this now for a couple of hours and can't seem to > see the problem with the code. A little help from some extra eyes would be > very appreciative. > > > > I am trying to create a database in mysql and then execute some sql > scripts on the newly created database. All of this of course done using the > task. Here is the code for a couple of the targets in the build.xml: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Now as you can tell the script will first use mysqladmin to create the > database. That particular task executes just fine and creates the databse > with no problems. However, whenever I run the second target, in this case > sql_script_1, it does not update the database and the resulting exec returns > a 1. > > > > I can run the same command from the command line on the machine I am > testing this script on and it works properly. The command is: > > mysql project.db.name < path_to_script/sql1 > > > > This works fine like I say from the command line but not from inside ant. > > > > Anyone have any thoughts or suggestions for this?? Seen anything like it > before?? > > > > Thanks in advance! > > > > damon > > > > > > > > --------------------------------- > > Do you Yahoo!? > > The New Yahoo! Search - Faster. Easier. Bingo. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > --------------------------------- > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo.