Page 1 of 1

Problem importing a mysqldump

Posted: Sat Feb 04, 2006 11:30 am
by AGISB
I am duping the database contents (Mysql 4.0.20 on FreeBSD) from my life database. Now I want to import the dump into a freshly installed 5.0.18 on my local testserver (Suse Linux 10). I however get an error that I have an error in the mysql syntax.

I used

mysqldump -u root -p --opt --all-databases > backup.sql

and

mysql -u root -p < backup.sql


Is there a problem with different versions or have I overlooked something?

Posted: Sat Feb 04, 2006 12:34 pm
by josh
try mysql -u root -p

then it will prompt you for a password

then type \. backup.sql

Posted: Sat Feb 04, 2006 6:37 pm
by timvw
You might want to disable the checking of constraints while inserting contents etc...
I wrote a simply shell script that should do that: http://timvw.madoka.be/programming/bash/myrestore.txt