But you cut out all the important stuff.. why mysql failed :)

I think the ( ) are just a display thing.  That's not what its passing to the 
command line.

Your issue could simply be working directories, specifying where the file is, 
etc.  You need to understand why mysql is failing and interpret what its 
failing on.

-Steve


-----Original Message-----
From:   [EMAIL PROTECTED] on behalf of r0lan2
Sent:   Mon 3/24/2008 8:54 PM
To:     nant-users@lists.sourceforge.net
Cc:     
Subject:        Re: [NAnt-users] Executing a mysql script inside Nant


Hi,

Currenty, 
This is the error message for this option:
<exec program="mysql">
     <arg line="-u root"/>
     <arg line="-pholamundo &lt; CreateDataBase.sql"/>
   </exec>


Buildfile:
file:///C:/TesisSource/Releases/0.1/SW/l10nCommunity.DataAccess/MySql
Database/CommonSqlScripts/DataBase.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: CreateAll


CreateStructure:

     [exec] Starting 'mysql ( -h localhost -u root -pholamundo <
CreateDataBase.
sql)' in
'C:\TesisSource\Releases\0.1\SW\l10nCommunity.DataAccess\MySqlDatabase\
CommonSqlScripts'
     [exec] mysql  Ver 14.12 Distrib 5.0.45, for Win32 (ia32)
     [exec] Copyright (C) 2002 MySQL AB
..
... a lot of info abou the comand of Mysql

BUILD FAILED

C:\TesisSource\Releases\0.1\SW\l10nCommunity.DataAccess\MySqlDatabase\CommonSqlS
cripts\DataBase.build(21,6):
External Program Failed: mysql (return code was 1)

Total time: 0.5 seconds.


Now, I put the command wich Nant executed:

mysql ( -h localhost -u root -pholamundo < CreateDataBase.sql)

C:\TesisSource\Releases\0.1\SW\l10nCommunity.DataAccess\MySqlDatabase\CommonSqlS
cripts>mysql ( -h localhost -u root -pholamundo < CreateDataBase.
El sistema no puede hallar el archivo especificado.

(ups, the translation for this is:  the " The system can not find the file
specified")

so, The comand works if I put the console the same command  but without
arentisis: "mysql  -h localhost -u root -pholamundo < CreateDataBase.sql". 

thanks Steve,

Rolando,
Chile =)














r0lan2 wrote:
> 
> Hi,
> I'm trying install a  Mysql database using nant, this is a part of my
> build file:
> <target name="CreateStructure" description="Creating Database" >
>     <exec program="mysql" append="True" verbose="True" commandline="-h
> localhost -u root -pholamundo">
>         <arg value="CreateDataBase.sql" />
>     </exec>
>     <exec program="mysql" append="True" verbose="True"
>               commandline="-h localhost -u root -pholamundo -e source " >
>       <arg value="Populatelookups.sql" />     
>     </exec> 
>   </target>
> 
> My problem is with: How to put the name of the script to execute ??
> 
> 
> Really, I want execute a command like this:
> 
> mysql -h localhost -u root -pholamundo < Script1.sql
> 
> 
> 
> any commnet or help =) ?
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Executing-a-mysql-script-inside-Nant-tp16256023p16266031.html
Sent from the NAnt - Users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to