ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <levylamb...@tiscali-dsl.de>
Subject Re: perplexing exec mysql problem
Date Thu, 22 May 2003 15:07:32 GMT
I do not know mysql; maybe with mysqladmin you can create your first user
and password ?
Antoine
----- Original Message -----
From: "M Damon Hill" <hwgwld17@yahoo.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Thursday, May 22, 2003 3:19 PM
Subject: Re: perplexing exec mysql problem


> Antoine--
>
> Thanks for the tips. I am now using the <sql> 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 <sql> 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 <levylambert@tiscali-dsl.de> 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.


Mime
View raw message