views:

17

answers:

1

Hey,

Ive got a rather strange issue, ive got an automated build tool that is calling through to the mysql command line to teardown then setup a database from an SQL file.

On one computer it is working fine, and its basically calling:

Mysql -h {Connection::Host} -u {Connection::User} --password={Connection::Password} < {sqlFile}

Ive just checked it out on another computer and tried to build and it keeps giving me the error "The system cannot find the file specified.". The MySQL versions are the same 5.1 and no other files have changed. The only thing that i know is different is where the build files are deployed... at home they are deployed to:

d:/code/projects/xxxxx/

whereas on this computer that doesn't work it is deployed to:

c:\Documents and Settings\xxxxxx\My Documents\Projects\Other\xxxxxx\

The interwebs brought back a few possibilities such as the spaces within the path, however ive tried adding the -i to the command (ignore spaces) and it made no difference.

Anyone have any ideas?

+1  A: 

It's most likely the spaces in the path. The part after the space will be passed to the program as a different parameter.

Try surrounding {sqlFile} with double quotes.

Mysql .... < "{sqlFile}"
Pekka
Like always, Stackoverflow shows me that im an idiot...
Grofit
@Grofit it does that to everyone. :)
Pekka