1

mysqldump cannot create sql file if there is an space in path provided like

K:/My Folder/backup.sql

while if i create in any folder where there is no space, it easily creates it like

K:/MyFolder/HisFolder/HerFolder/backup.sql

I tried to find an answer but all in vein. I tried to replace spaces with %20 but not worked. I am using MysqlDump with Java to create backup. Both Java and Command Prompt replies same as

Got Error 1049: Unknown Database 'Folder/backup.sql' when selecting the database.

I also tried to put path in inverted commas etc but no use. My command is

C:/xampp/mysql/bin/mysqldump --add-drop-database -u root -pabc --routines --database db_abc -r K:/my folder/backup.sql
3
  • Did you try using the MS-DOS version of the folder name? Oct 29, 2013 at 15:04
  • i am using mysqldump with java to create backup. Java and Command Prompt both replies same Oct 29, 2013 at 15:06
  • What I mean is, if "My Folder" already exists, does mysqldump work if you specify the folder as "MYFOLD~1"? Oct 29, 2013 at 15:10

2 Answers 2

2

Just add " around them

"K:/My Folder/backup.sql"
1

You need to quote your path. "K:/My Folder/backup.sql"

1
  • this is exactly the same answer as mine. Oct 29, 2013 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.