MySQL Forums
Forum List  »  Newbie

mysqldump made file that can't be imported
Posted by: Mike Levin
Date: May 05, 2015 01:28PM

I was using an Apple front end program called MailStewardPro to interface to a mail database kept by MySQL (running on a Linux box). I had a huge database (about 500,000 messages, 160 Gb total size) and at one point did a backup (export), which calls mysqldump to create a .sql file. Now that my hard drive has crashed, I reinstalled MySQL and need to import the file. I've done

mysql -u root -p --max_allowed_packet=500MB --default-character-set=utf8 -f < file.sql

and it says

"ERROR 1046 (#D000) at line ...: No database selected"

for each line in the database. It does allow importing of an older version of the database, but not this file. I hadn't moved the file since it was created, and I don't think it's damaged. Can someone please help me figure out how to import it - an exported backup file is useless if I can't get it back... What could be wrong? I'm a complete newb with SQL, I was hoping to just use the front end and tried the direct mysql import when the MailSteward Pro software complained about the file.

Options: ReplyQuote


Subject
Written By
Posted
mysqldump made file that can't be imported
May 05, 2015 01:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.