Page 1 of 1

system and mysqldump in winxp

Posted: Wed Jul 27, 2005 5:40 am
by tores
Hi

I can't seem to get the following database-backup command to work...

Code: Select all

$last_line = system('"C:\\Program Files\\MySQL\\MySQL Server 4.1\\bin\\mysqldump.exe" -u[user] -p[pass] [db_name] > C:\\Program Files\\MySQL\\MySQL Server 4.1\\backup\\27_07_2005_backup.sql', $result);
I've tried with all sorts of combinations with double quotes and one(DIRECTORY_SEPARATOR) or two backslashes.
But all I get is either:

Code: Select all

C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqldump.exe: Got error: 1103: Incorrect table name 'Files\MySQL\MySQL' when doing LOCK TABLES
with the statement above (which I presume is the closest to being correct) or

Code: Select all

'C:\Program' is not recognized as an internal or external command, operable program or batch file.
with other combinations of double quotes and backslashes...

Any suggestion is appreciated...

regards tores

Posted: Wed Jul 27, 2005 5:43 am
by anjanesh
Have you tried using the short file names (DOS type - 12 chars max) like
C:\\PROGRA~1\\etc ?

Posted: Wed Jul 27, 2005 6:07 am
by tores
Swithed to short names and now it's working. Thanks a bunch :D

regards tores