LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Unable to import MySQL dump (https://www.linuxquestions.org/questions/linux-software-2/unable-to-import-mysql-dump-703327/)

MheAd 02-09-2009 06:40 AM

Unable to import MySQL dump
 
Hi guys,
I've got this big problem at work - nobody here is really a database expert at the moment. We are basically dumping stuff from this old server and are migrating data into the new one. I can't seem to be able to import the MySQL-server data that was previously dumped.

For dumping, I used the usual

mysqldump -u root -p --all-databases > dump.sql

After copying it over to the new server with scp, on the new server I tried to import it with.

mysql -u root -p < dump.sql

The import started and several databases got properly imported but at one point it failed on me and the import stopped with following error:

Code:

ERROR 1064 (42000) at line 246: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/
/*!50003 CREATE TRIGGER `nyposttillftimalbeskrivning` AFTER INSERT ON `malbesk' at line 1

If I export all other databases that I need and import them seperately, it will work - only this one in particular is making me problems because of - well, whatever it means, the stated above in the error message.

The original server that the dump was created from is MySQL 5.0.13-rc-max. The import was intended for the most recent 5.1. I even went down to the latest 5.0.x version (.67) and try to import it from there - always same failure.

I would appreciate if you could guys help me out with the tips...
Thanks in advance...

chrism01 02-09-2009 08:03 PM

To start with I'd use vim or more to go through the broken file and pull out the complete 'create trigger...' statement.
Use a a separate file for each DB/schema, so it's not so big.
You can then post that here, but you might get a faster answer at the mysql forums http://forums.mysql.com/
I also strongly recommend you bookmark this: http://dev.mysql.com/doc/refman/5.1/en/index.html


All times are GMT -5. The time now is 01:04 AM.